diff src/cjr_print.sml @ 102:5f04adf47f48

Writing HTML
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 14:02:54 -0400
parents 717b6f8d8505
children d101cb1efe55
line wrap: on
line diff
--- a/src/cjr_print.sml	Thu Jul 10 11:13:49 2008 -0400
+++ b/src/cjr_print.sml	Thu Jul 10 14:02:54 2008 -0400
@@ -142,6 +142,10 @@
                  string "})"]
         end
 
+      | EWrite e => box [string "(lw_write(",
+                         p_exp env e,
+                         string "), lw_unit_v)"]
+
 and p_exp env = p_exp' false env
 
 fun p_decl env ((d, _) : decl) =
@@ -219,9 +223,7 @@
                                              val r = (ERecord (ri, [("env", envx),
                                                                     ("arg", (ERecord (ari, []), loc))]), loc)
                                          in
-                                             box [string "return",
-                                                  space,
-                                                  p_exp env (EApp (code, r), loc),
+                                             box [p_exp env (EApp (code, r), loc),
                                                   string ";"]
                                          end
                                        | _ => string "Page handler is too complicated! [6]"
@@ -247,7 +249,7 @@
              newline,
              p_list_sep newline (fn x => x) pds,
              newline,
-             string "char *lw_handle(void) {",
+             string "void lw_handle(void) {",
              newline,
              p_list_sep newline (fn x => x) pds',
              newline,