diff src/mono_print.sml @ 1932:98895243b5b6

Change handling of returned text blobs, to activate the normal EWrite optimizations
author Adam Chlipala <adam@chlipala.net>
date Wed, 11 Dec 2013 18:22:10 -0500
parents e15234fbb163
children 278e10629ba1
line wrap: on
line diff
--- a/src/mono_print.sml	Wed Dec 11 14:57:54 2013 -0500
+++ b/src/mono_print.sml	Wed Dec 11 18:22:10 2013 -0500
@@ -235,18 +235,30 @@
                               space,
                               p_typ env t,
                               string ")"]
-      | EReturnBlob {blob, mimeType, t} => box [string "(blob",
-                                                space,
-                                                p_exp env blob,
-                                                space,
-                                                string "in",
-                                                space,
-                                                p_exp env mimeType,
-                                                space,
-                                                string ":",
-                                                space,
-                                                p_typ env t,
-                                                string ")"]
+      | EReturnBlob {blob = SOME blob, mimeType, t} => box [string "(blob",
+                                                            space,
+                                                            p_exp env blob,
+                                                            space,
+                                                            string "in",
+                                                            space,
+                                                            p_exp env mimeType,
+                                                            space,
+                                                            string ":",
+                                                            space,
+                                                            p_typ env t,
+                                                            string ")"]
+      | EReturnBlob {blob = NONE, mimeType, t} => box [string "(blob",
+                                                       space,
+                                                       string "<page>",
+                                                       space,
+                                                       string "in",
+                                                       space,
+                                                       p_exp env mimeType,
+                                                       space,
+                                                       string ":",
+                                                       space,
+                                                       p_typ env t,
+                                                       string ")"]
       | ERedirect (e, t) => box [string "(redirect",
                                  space,
                                  p_exp env e,