summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2019-04-09 15:33:45 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2019-04-09 15:33:45 -0400
commitc4aba7a0befd9988ae032c5532790e5fabb321b9 (patch)
tree14a3d3c567bf18c62ce81a45eb52dd247573fb1a
parent36cf7530768eeec286e4a07a5794c0e1b27b8c3f (diff)
Urlify unit values as underscores, to avoid confusing parser
-rw-r--r--src/cjr_print.sml2
-rw-r--r--src/mono_fooify.sml4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index d7416616..5ef891db 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -952,7 +952,7 @@ fun unurlify fromClient env (t, loc) =
newline,
string ":",
space,
- string ("(uw_error(ctx, FATAL, \"Error unurlifying list: %s\", request), NULL))));"),
+ string ("(uw_error(ctx, FATAL, \"Error unurlifying list: %s\", *request), NULL))));"),
newline],
string "}",
newline,
diff --git a/src/mono_fooify.sml b/src/mono_fooify.sml
index e64207cd..9cb14400 100644
--- a/src/mono_fooify.sml
+++ b/src/mono_fooify.sml
@@ -165,12 +165,12 @@ fun fooifyExpWithExceptions fk lookupENamed lookupDatatype =
end
| _ =>
case t of
- TFfi ("Basis", "unit") => ((EPrim (Prim.String (Prim.Normal, "")), loc), fm)
+ TFfi ("Basis", "unit") => ((EPrim (Prim.String (Prim.Normal, "_")), loc), fm)
| TFfi (m, x) => (if Settings.mayClientToServer (m, x)
then ((EFfiApp (m, fk2s fk ^ "ify" ^ capitalize x, [(e, tAll)]), loc), fm)
else raise CantPass (fm, tAll))
- | TRecord [] => ((EPrim (Prim.String (Prim.Normal, "")), loc), fm)
+ | TRecord [] => ((EPrim (Prim.String (Prim.Normal, "_")), loc), fm)
| TRecord ((x, t) :: xts) =>
let
val (se, fm) = fooify fm ((EField (e, x), loc), t)