summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cjr_print.sml1
-rw-r--r--src/prepare.sml6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index a6eb0ffe..73a4f0fc 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -425,6 +425,7 @@ fun getPargs (e, _) =
| EFfiApp ("Basis", "sqlifyFloat", [e]) => [(e, Float)]
| EFfiApp ("Basis", "sqlifyString", [e]) => [(e, String)]
| EFfiApp ("Basis", "sqlifyBool", [e]) => [(e, Bool)]
+ | ECase (e, _, _) => [(e, Bool)]
| _ => raise Fail "CjrPrint: getPargs"
diff --git a/src/prepare.sml b/src/prepare.sml
index a6b6a4f3..20a09c9b 100644
--- a/src/prepare.sml
+++ b/src/prepare.sml
@@ -45,6 +45,12 @@ fun prepString (e, ss, n) =
SOME ("$" ^ Int.toString (n + 1) ^ "::text" :: ss, n + 1)
| EFfiApp ("Basis", "sqlifyBool", [e]) =>
SOME ("$" ^ Int.toString (n + 1) ^ "::bool" :: ss, n + 1)
+ | ECase (e,
+ [((PCon (_, PConFfi {mod = "Basis", con = "True", ...}, _), _),
+ (EPrim (Prim.String "TRUE"), _)),
+ ((PCon (_, PConFfi {mod = "Basis", con = "False", ...}, _), _),
+ (EPrim (Prim.String "FALSE"), _))],
+ _) => SOME ("$" ^ Int.toString (n + 1) ^ "::bool" :: ss, n + 1)
| _ => NONE