From 34a7251cff433852cee6c26c7309bd4425740333 Mon Sep 17 00:00:00 2001 From: christiaanb Date: Mon, 21 Jun 2010 14:55:22 +0200 Subject: [PATCH] Print null character instead of empty character when adt has no fields --- clash/CLasH/VHDL/VHDLTools.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clash/CLasH/VHDL/VHDLTools.hs b/clash/CLasH/VHDL/VHDLTools.hs index edaa5d2..8f282b4 100644 --- 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)) -- 2.30.2