diff options
-rw-r--r-- | include/urweb.h | 1 | ||||
-rw-r--r-- | src/c/urweb.c | 5 | ||||
-rw-r--r-- | src/cjr_print.sml | 4 | ||||
-rw-r--r-- | src/monoize.sml | 3 |
4 files changed, 10 insertions, 3 deletions
diff --git a/include/urweb.h b/include/urweb.h index 8d182978..46ef9558 100644 --- a/include/urweb.h +++ b/include/urweb.h @@ -117,6 +117,7 @@ uw_unit uw_Basis_urlifyString_w(uw_context, uw_Basis_string); uw_unit uw_Basis_urlifyBool_w(uw_context, uw_Basis_bool); uw_unit uw_Basis_urlifyChannel_w(uw_context, uw_Basis_channel); +uw_Basis_unit uw_Basis_unurlifyUnit(uw_context ctx, char **s); uw_Basis_int uw_Basis_unurlifyInt(uw_context, char **); uw_Basis_float uw_Basis_unurlifyFloat(uw_context, char **); uw_Basis_string uw_Basis_unurlifyString(uw_context, char **); 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) => |