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:
3e0c7dd
)
Print null character instead of empty character when adt has no fields
author
christiaanb
<christiaan.baaij@gmail.com>
Mon, 21 Jun 2010 12:55:22 +0000
(14:55 +0200)
committer
christiaanb
<christiaan.baaij@gmail.com>
Mon, 21 Jun 2010 12:55:22 +0000
(14:55 +0200)
clash/CLasH/VHDL/VHDLTools.hs
patch
|
blob
|
history
diff --git
a/clash/CLasH/VHDL/VHDLTools.hs
b/clash/CLasH/VHDL/VHDLTools.hs
index edaa5d2128ae271c782869ac5c8835aa70067f34..8f282b422afa4c7a5047f15e47f08d03c11466dd 100644
(file)
--- a/
clash/CLasH/VHDL/VHDLTools.hs
+++ b/
clash/CLasH/VHDL/VHDLTools.hs
@@
-649,7
+649,7
@@
mkAdtShow conLbl conIds elemIdss adtTM = AST.SubProgBody showSpec [] [showExpr]
[AST.CaseSmAlt [AST.ChoiceE $ AST.PrimLit $ show x]
[AST.ReturnSm (Just $ ((genExprFCall showId) . (selectedName adtPar) $ mkVHDLBasicId conLbl) AST.:&: showFields x)] | x <- [0..(length conIds) -1]]
showFields i = if (null (elemIdss!!i)) then
- AST.PrimLit "
''
"
+ AST.PrimLit "
nul
"
else
foldr1 (\e1 e2 -> e1 AST.:&: e2) $
map ((AST.PrimLit "' '" AST.:&:) . (genExprFCall showId) . (selectedName adtPar))