projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad03cc5
)
Add stringToVHDLExpr function.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 9 Jun 2010 20:29:23 +0000
(22:29 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 9 Jun 2010 20:29:23 +0000
(22:29 +0200)
clash/CLasH/VHDL/VHDLTools.hs
patch
|
blob
|
history
diff --git
a/clash/CLasH/VHDL/VHDLTools.hs
b/clash/CLasH/VHDL/VHDLTools.hs
index 165b1ef655710195d244dd13ade22cd243be218d..7677369a59c784c516464e9030eb07742fdfa257 100644
(file)
--- 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.