X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=blobdiff_plain;f=clash%2FCLasH%2FVHDL%2FVHDLTools.hs;h=7677369a59c784c516464e9030eb07742fdfa257;hp=165b1ef655710195d244dd13ade22cd243be218d;hb=b17e2ae55f553ae206d9459799392d4d618b0e13;hpb=ad03cc5631a7fe45b1ada4fb0ad2849558f4574e diff --git a/clash/CLasH/VHDL/VHDLTools.hs b/clash/CLasH/VHDL/VHDLTools.hs index 165b1ef..7677369 100644 --- a/clash/CLasH/VHDL/VHDLTools.hs +++ b/clash/CLasH/VHDL/VHDLTools.hs @@ -162,6 +162,11 @@ idToVHDLExpr = vhdlNameToVHDLExpr . AST.NSimple -- Turn a Core expression into an AST expression exprToVHDLExpr core = varToVHDLExpr (exprToVar core) +-- Turn a String into a VHDL expr containing an id +stringToVHDLExpr :: String -> AST.Expr +stringToVHDLExpr = idToVHDLExpr . mkVHDLExtId + + -- Turn a alternative constructor into an AST expression. For -- dataconstructors, this is only the constructor itself, not any arguments it -- has. Should not be called with a DEFAULT constructor.