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:
2e17468
)
Enum literals are now correctly translated to numbers
author
christiaanb
<christiaan.baaij@gmail.com>
Mon, 21 Jun 2010 15:07:15 +0000
(17:07 +0200)
committer
christiaanb
<christiaan.baaij@gmail.com>
Mon, 21 Jun 2010 15:07:15 +0000
(17:07 +0200)
clash/CLasH/VHDL/VHDLTools.hs
patch
|
blob
|
history
diff --git
a/clash/CLasH/VHDL/VHDLTools.hs
b/clash/CLasH/VHDL/VHDLTools.hs
index 8f282b422afa4c7a5047f15e47f08d03c11466dd..3dcd951bcb7a9822509fc77d0807f2a137734aeb 100644
(file)
--- a/
clash/CLasH/VHDL/VHDLTools.hs
+++ b/
clash/CLasH/VHDL/VHDLTools.hs
@@
-192,7
+192,7
@@
dataconToVHDLExpr dc = do
let existing_ty = Monad.liftM (fmap fst) $ Map.lookup htype typemap
case existing_ty of
Just ty -> do
- let lit =
idToVHDLExpr $ mkVHDLExtId
$ Name.getOccString dcname
+ let lit =
AST.PrimLit $ show $ getConstructorIndex htype
$ Name.getOccString dcname
return lit
Nothing -> error $ "\nVHDLTools.dataconToVHDLExpr: Trying to make value for non-representable DataCon: " ++ pprString dc
-- Error when constructing htype