diff options
author | 2009-04-26 09:02:17 -0400 | |
---|---|---|
committer | 2009-04-26 09:02:17 -0400 | |
commit | 38507c697c6b5f277cabc5eb61afff14ea02da07 (patch) | |
tree | 0405c498a9fae8ff066ca8fdeafa8f85b0615dbe /src/cjr_print.sml | |
parent | d2274ae571370a5f0b88a6b0a5b264fde29378b9 (diff) |
Returning a blob as page result
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r-- | src/cjr_print.sml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml index 07e3931f..3f7ec1e1 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -1276,8 +1276,26 @@ fun p_exp' par env (e, loc) = string "tmp;", newline, string "})"] + | EReturnBlob {blob, mimeType, t} => + box [string "({", + newline, + p_typ env t, + space, + string "tmp;", + newline, + string "uw_return_blob(ctx, ", + p_exp env blob, + string ", ", + p_exp env mimeType, + string ");", + newline, + string "tmp;", + newline, + string "})"] | EApp ((EError (e, (TFun (_, ran), _)), loc), _) => p_exp env (EError (e, ran), loc) + | EApp ((EReturnBlob {blob, mimeType, t = (TFun (_, ran), _)}, loc), _) => + p_exp env (EReturnBlob {blob = blob, mimeType = mimeType, t = ran}, loc) | EFfiApp (m, x, es) => box [string "uw_", p_ident m, |