summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-01-01 12:48:06 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-01-01 12:48:06 -0500
commit869bd80eacff24151b92e496ee6b0cade56d9e59 (patch)
tree3c64d22855203be239df77b4bd617fbcf3a6257a /src
parent66ea568ab5cd2b187a305ef6d22c8cfaf2a6c629 (diff)
Proper [un]urlification of unit
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c5
-rw-r--r--src/cjr_print.sml4
-rw-r--r--src/monoize.sml3
3 files changed, 9 insertions, 3 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index a54d427a..e7495347 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -1793,6 +1793,11 @@ uw_Basis_string uw_Basis_unurlifyString(uw_context ctx, char **s) {
return r;
}
+uw_Basis_unit uw_Basis_unurlifyUnit(uw_context ctx, char **s) {
+ *s = uw_unurlify_advance(*s);
+ return uw_unit_v;
+}
+
uw_Basis_string uw_Basis_unurlifyString_fromClient(uw_context ctx, char **s) {
char *new_s = uw_unurlify_advance(*s);
char *r, *s1, *s2;
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 9f63edaf..93f50de2 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -565,14 +565,14 @@ fun unurlify fromClient env (t, loc) =
let
fun unurlify' rf t =
case t of
- TFfi ("Basis", "unit") => string "uw_unit_v"
+ TFfi ("Basis", "unit") => string "uw_Basis_unurlifyUnit(ctx, &request)"
| TFfi ("Basis", "string") => string (if fromClient then
"uw_Basis_unurlifyString_fromClient(ctx, &request)"
else
"uw_Basis_unurlifyString(ctx, &request)")
| TFfi (m, t) => string ("uw_" ^ ident m ^ "_unurlify" ^ capitalize t ^ "(ctx, &request)")
- | TRecord 0 => string "uw_unit_v"
+ | TRecord 0 => string "uw_Basis_unurlifyUnit(ctx, &request)"
| TRecord i =>
let
val xts = E.lookupStruct env i
diff --git a/src/monoize.sml b/src/monoize.sml
index 4d3bfda2..ff5a0f3a 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -433,7 +433,8 @@ fun fooifyExp fk env =
end
| _ =>
case t of
- L'.TFfi (m, x) => ((L'.EFfiApp (m, fk2s fk ^ "ify" ^ capitalize x, [e]), loc), fm)
+ L'.TFfi ("Basis", "unit") => ((L'.EPrim (Prim.String ""), loc), fm)
+ | L'.TFfi (m, x) => ((L'.EFfiApp (m, fk2s fk ^ "ify" ^ capitalize x, [e]), loc), fm)
| L'.TRecord [] => ((L'.EPrim (Prim.String ""), loc), fm)
| L'.TRecord ((x, t) :: xts) =>