# HG changeset patch # User Adam Chlipala # Date 1218325572 14400 # Node ID c938fe391c84b3571cafe3e5000a508f50a7ea32 # Parent ab86aa858e6c512ab434d63160d73266355a26eb strings get 'Option' datatype handling; fix datatype unurlifying diff -r ab86aa858e6c -r c938fe391c84 src/c/lacweb.c --- a/src/c/lacweb.c Sat Aug 09 19:23:31 2008 -0400 +++ b/src/c/lacweb.c Sat Aug 09 19:46:12 2008 -0400 @@ -543,8 +543,6 @@ 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 @@ strcat(s, s2); ctx->heap_front += len; - printf("s = %s\n", s); - return s; } diff -r ab86aa858e6c -r c938fe391c84 src/cjr_print.sml --- a/src/cjr_print.sml Sat Aug 09 19:23:31 2008 -0400 +++ b/src/cjr_print.sml Sat Aug 09 19:46:12 2008 -0400 @@ -80,6 +80,7 @@ | 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 @@ 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 @@ 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 @@ case #1 t of TDatatype _ => unurlify t + | TFfi ("Basis", "string") => unurlify t | _ => box [string "({", newline, p_typ env t, @@ -985,8 +990,6 @@ 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_",