diff src/cjr_print.sml @ 731:e0dd85ea58e1

Label exported symbols by effect-ness; factor out some common datatypes
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Apr 2009 14:49:25 -0400
parents 4c5796512edc
children f2a2be93331c
line wrap: on
line diff
--- a/src/cjr_print.sml	Thu Apr 16 14:35:01 2009 -0400
+++ b/src/cjr_print.sml	Thu Apr 16 14:49:25 2009 -0400
@@ -2208,8 +2208,8 @@
         val fields = foldl (fn ((ek, _, _, ts, _, _), fields) =>
                                case ek of
                                    Core.Link => fields
-                                 | Core.Rpc => fields
-                                 | Core.Action =>
+                                 | Core.Rpc _ => fields
+                                 | Core.Action _ =>
                                    case List.nth (ts, length ts - 2) of
                                        (TRecord i, _) =>
                                        let
@@ -2331,8 +2331,8 @@
                 val (ts, defInputs, inputsVar) =
                     case ek of
                         Core.Link => (List.take (ts, length ts - 1), string "", string "")
-                      | Core.Rpc => (List.take (ts, length ts - 1), string "", string "")
-                      | Core.Action =>
+                      | Core.Rpc _ => (List.take (ts, length ts - 1), string "", string "")
+                      | Core.Action _ =>
                         case List.nth (ts, length ts - 2) of
                             (TRecord i, _) =>
                             let
@@ -2414,8 +2414,8 @@
                      string "if (*request == '/') ++request;",
                      newline,
                      box (case ek of
-                              Core.Rpc => [string "uw_write_header(ctx, \"Content-type: text/plain\\r\\n\");",
-                                           newline]
+                              Core.Rpc _ => [string "uw_write_header(ctx, \"Content-type: text/plain\\r\\n\");",
+                                             newline]
                             | _ => [string "uw_write_header(ctx, \"Content-type: text/html\\r\\n\");",
                                     newline,
                                     string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");",
@@ -2457,12 +2457,12 @@
                                                                 newline]) ts),
                           defInputs,
                           box (case ek of
-                                   Core.Rpc => [p_typ env ran,
-                                                space,
-                                                string "it0",
-                                                space,
-                                                string "=",
-                                                space]
+                                   Core.Rpc _ => [p_typ env ran,
+                                                  space,
+                                                  string "it0",
+                                                  space,
+                                                  string "=",
+                                                  space]
                                  | _ => []),
                           p_enamed env n,
                           string "(",
@@ -2474,7 +2474,7 @@
                           string ", uw_unit_v);",
                           newline,
                           box (case ek of
-                                   Core.Rpc => [urlify env ran]
+                                   Core.Rpc _ => [urlify env ran]
                                  | _ => [string "uw_write(ctx, \"</html>\");",
                                          newline]),
                           string "return;",