From: Matthijs Kooijman Date: Wed, 9 Jun 2010 20:29:23 +0000 (+0200) Subject: Add stringToVHDLExpr function. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=b17e2ae55f553ae206d9459799392d4d618b0e13;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Add stringToVHDLExpr function. --- 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.