- [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]]
+ [AST.CaseSmAlt [AST.ChoiceE $ AST.PrimLit $ show x] (
+ if (null (elemIdss!!x)) then
+ [AST.ReturnSm (Just $ ((genExprFCall2 showId) . (\x -> (selectedName adtPar x, AST.PrimLit "false")) $ mkVHDLBasicId conLbl) AST.:&: showFields x)]
+ else
+ [addParens (((genExprFCall2 showId) . (\x -> (selectedName adtPar x, AST.PrimLit "false")) $ mkVHDLBasicId conLbl) AST.:&: showFields x)]
+ ) | x <- [0..(length conIds) -1]]