summaryrefslogtreecommitdiff
path: root/src/cjrize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-12-11 18:22:10 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2013-12-11 18:22:10 -0500
commitd7c4817af0c7f4ea2ed30b4a34408f2f92e9e979 (patch)
tree3e8a07b87b557e42d86d6dd5f3052a3fd1dd84ec /src/cjrize.sml
parenta8459c0104ca36fd058ea527890116c7a1bca8fd (diff)
Change handling of returned text blobs, to activate the normal EWrite optimizations
Diffstat (limited to 'src/cjrize.sml')
-rw-r--r--src/cjrize.sml11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cjrize.sml b/src/cjrize.sml
index 0f4bdb42..d153feff 100644
--- a/src/cjrize.sml
+++ b/src/cjrize.sml
@@ -372,13 +372,20 @@ fun cifyExp (eAll as (e, loc), sm) =
in
((L'.EError (e, t), loc), sm)
end
- | L.EReturnBlob {blob, mimeType, t} =>
+ | L.EReturnBlob {blob = NONE, mimeType, t} =>
+ let
+ val (mimeType, sm) = cifyExp (mimeType, sm)
+ val (t, sm) = cifyTyp (t, sm)
+ in
+ ((L'.EReturnBlob {blob = NONE, mimeType = mimeType, t = t}, loc), sm)
+ end
+ | L.EReturnBlob {blob = SOME blob, mimeType, t} =>
let
val (blob, sm) = cifyExp (blob, sm)
val (mimeType, sm) = cifyExp (mimeType, sm)
val (t, sm) = cifyTyp (t, sm)
in
- ((L'.EReturnBlob {blob = blob, mimeType = mimeType, t = t}, loc), sm)
+ ((L'.EReturnBlob {blob = SOME blob, mimeType = mimeType, t = t}, loc), sm)
end
| L.ERedirect (e, t) =>
let