Skip to content

Commit

Permalink
Fix Boolean printing
Browse files Browse the repository at this point in the history
Fix printing
  • Loading branch information
jazullo committed Oct 4, 2023
1 parent 8fcbf06 commit 9aec7e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gibbon-compiler/src/Gibbon/L1/GenSML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ ppPrim pr pes = case pr of
PrintInt -> printer "Int" $ ppE $ head pes
PrintChar -> printer "Char" $ ppE $ head pes
PrintFloat -> printer "Float" $ ppE $ head pes
PrintBool -> printer "Bool" $ ppE $ head pes
PrintBool -> ppAp "(fn true => \"True\" | false => \"False\")" pes
PrintSym -> ppAp "print" pes
ReadInt -> error "ReadInt" -- Have every program read from stdin?
DictInsertP _ -> error "DictInsertP"
Expand Down Expand Up @@ -377,7 +377,7 @@ printerTy1 ty1 d = case ty1 of
CharTy -> printer "Char" d
FloatTy -> printer "Float" d
SymTy -> _
BoolTy -> printer "Bool" d
BoolTy -> parens $ "(fn true => print \"True\" | false => print \"False\") " <> d
ProdTy uts ->
parens $ hsep
[ "case", d, "of"
Expand Down

0 comments on commit 9aec7e6

Please sign in to comment.