diff src/cjr_print.sml @ 199:c938fe391c84

strings get 'Option' datatype handling; fix datatype unurlifying
author Adam Chlipala <adamc@hcoop.net>
date Sat, 09 Aug 2008 19:46:12 -0400
parents ab86aa858e6c
children 5dbba661deab
line wrap: on
line diff
--- 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_",