summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cjr_print.sml4
-rw-r--r--src/tag.sml9
2 files changed, 7 insertions, 6 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index cb88ca84..1c750b33 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -1481,9 +1481,9 @@ fun p_exp' par env (e, loc) =
in
box [string "({",
newline,
- string "uw_Basis_string request = ",
+ string "uw_Basis_string request = uw_Basis_strdup(ctx, ",
p_exp env e,
- string ";",
+ string ");",
newline,
newline,
string "(request ? ",
diff --git a/src/tag.sml b/src/tag.sml
index b19a0544..715da9ed 100644
--- a/src/tag.sml
+++ b/src/tag.sml
@@ -184,6 +184,8 @@ fun tag file =
val newDs = map
(fn (ek, f, cn) =>
let
+ val unit = (TRecord (CRecord ((KType, loc), []), loc), loc)
+
fun unravel (all as (t, _)) =
case t of
TFun (dom, ran) =>
@@ -197,15 +199,14 @@ fun tag file =
val (fnam, t, _, tag) = E.lookupENamed env f
val (args, result) = unravel t
- val unit = (TRecord (CRecord ((KType, loc), []), loc), loc)
-
val (abs, t) =
case args of
[] =>
let
- val body = (EWrite (ENamed f, loc), loc)
+ val app = (EApp ((ENamed f, loc), (ERecord [], loc)), loc)
+ val body = (EWrite app, loc)
in
- ((EAbs ("x", unit, unit, body), loc),
+ (body,
(TFun (unit, unit), loc))
end
| _ =>