Skip to content

Commit d28fca1

Browse files
committed
Fix product printer
1 parent f505c5c commit d28fca1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gibbon-compiler/src/Gibbon/L1/GenSML.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,15 @@ printerTy1 ty1 d = case ty1 of
377377
FloatTy -> printer "Float" d
378378
SymTy -> _
379379
BoolTy -> parens $ "(fn true => print \"True\" | false => print \"False\") " <> d
380+
ProdTy [] -> "let val () = " <> d <> " in (print \"#()\") end"
380381
ProdTy uts ->
381382
parens $ hsep
382383
[ "case", d, "of"
383384
, parens $ interleave comma $ ("x__" <>) . int . fst <$> zip [1..] uts
384385
, "-> let"
386+
, "val _ = print \"(\""
385387
, foldMap ppSub $ zip [1..] uts
388+
, "val _ = print \")\""
386389
, "in ()"
387390
]
388391
where

0 commit comments

Comments
 (0)