From b17e2ae55f553ae206d9459799392d4d618b0e13 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 9 Jun 2010 22:29:23 +0200 Subject: [PATCH] Add stringToVHDLExpr function. --- clash/CLasH/VHDL/VHDLTools.hs | 5 +++++ 1 file changed, 5 insertions(+) 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. -- 2.30.2