Skip to content

Commit 9aec7e6

Browse files
committed
Fix Boolean printing
Fix printing
1 parent 8fcbf06 commit 9aec7e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ ppPrim pr pes = case pr of
187187
PrintInt -> printer "Int" $ ppE $ head pes
188188
PrintChar -> printer "Char" $ ppE $ head pes
189189
PrintFloat -> printer "Float" $ ppE $ head pes
190-
PrintBool -> printer "Bool" $ ppE $ head pes
190+
PrintBool -> ppAp "(fn true => \"True\" | false => \"False\")" pes
191191
PrintSym -> ppAp "print" pes
192192
ReadInt -> error "ReadInt" -- Have every program read from stdin?
193193
DictInsertP _ -> error "DictInsertP"
@@ -377,7 +377,7 @@ printerTy1 ty1 d = case ty1 of
377377
CharTy -> printer "Char" d
378378
FloatTy -> printer "Float" d
379379
SymTy -> _
380-
BoolTy -> printer "Bool" d
380+
BoolTy -> parens $ "(fn true => print \"True\" | false => print \"False\") " <> d
381381
ProdTy uts ->
382382
parens $ hsep
383383
[ "case", d, "of"

0 commit comments

Comments
 (0)