summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-09 19:46:12 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-09 19:46:12 -0400
commit65edfa17d6df526c57fdb08bf033671c7c6756f6 (patch)
treea188369441311baef3363b17416ec9680c6ffc92 /src
parent0186af3d727b1b92e7b63925500a21d5e412d7b4 (diff)
strings get 'Option' datatype handling; fix datatype unurlifying
Diffstat (limited to 'src')
-rw-r--r--src/c/lacweb.c4
-rw-r--r--src/cjr_print.sml7
2 files changed, 5 insertions, 6 deletions
diff --git a/src/c/lacweb.c b/src/c/lacweb.c
index 9f17103a..e7cb381a 100644
--- a/src/c/lacweb.c
+++ b/src/c/lacweb.c
@@ -543,8 +543,6 @@ lw_Basis_string lw_Basis_strcat(lw_context ctx, lw_Basis_string s1, lw_Basis_str
int len = strlen(s1) + strlen(s2) + 1;
char *s;
- printf("s1 = %s\ns2 = %s\n", s1, s2);
-
lw_check_heap(ctx, len);
s = ctx->heap_front;
@@ -553,7 +551,5 @@ lw_Basis_string lw_Basis_strcat(lw_context ctx, lw_Basis_string s1, lw_Basis_str
strcat(s, s2);
ctx->heap_front += len;
- printf("s = %s\n", s);
-
return s;
}
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index be13461e..a9cc9ba5 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -80,6 +80,7 @@ fun p_typ' par env (t, loc) =
| SOME t =>
case #1 t of
TDatatype _ => p_typ' par env t
+ | TFfi ("Basis", "string") => p_typ' par env t
| _ => box [p_typ' par env t,
string "*"])
| TDatatype (Default, n, _) =>
@@ -216,6 +217,8 @@ fun p_pat (env, exit, depth) (p, _) =
case #1 t of
TDatatype _ => box [string "disc",
string (Int.toString depth)]
+ | TFfi ("Basis", "string") => box [string "disc",
+ string (Int.toString depth)]
| _ => box [string "*disc",
string (Int.toString depth)],
string ";",
@@ -336,6 +339,7 @@ fun p_exp' par env (e, loc) =
in
case #1 t of
TDatatype _ => p_exp' par env e
+ | TFfi ("Basis", "string") => p_exp' par env e
| _ => box [string "({",
newline,
p_typ env t,
@@ -914,6 +918,7 @@ fun p_file env (ds, ps) =
case #1 t of
TDatatype _ => unurlify t
+ | TFfi ("Basis", "string") => unurlify t
| _ => box [string "({",
newline,
p_typ env t,
@@ -985,8 +990,6 @@ fun p_file env (ds, ps) =
string (Int.toString (size x')),
string ";",
newline,
- string "if (request[0] == '/') ++request;",
- newline,
case to of
NONE => box []
| SOME t => box [string "tmp->data.lw_",