Mercurial > urweb
comparison src/mono_opt.sml @ 741:f7e2026dd5ae
Returning a blob as page result
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 26 Apr 2009 09:02:17 -0400 |
parents | 9864b64b1700 |
children | 8688e01ae469 |
comparison
equal
deleted
inserted
replaced
740:b302b6e35f93 | 741:f7e2026dd5ae |
---|---|
29 | 29 |
30 open Mono | 30 open Mono |
31 structure U = MonoUtil | 31 structure U = MonoUtil |
32 | 32 |
33 val bless = ref (fn _ : string => true) | 33 val bless = ref (fn _ : string => true) |
34 val blessMime = ref (CharVector.all (fn ch => Char.isAlphaNum ch orelse ch = #"-" orelse ch = #"/" orelse ch = #".")) | |
34 | 35 |
35 fun typ t = t | 36 fun typ t = t |
36 fun decl d = d | 37 fun decl d = d |
37 | 38 |
38 fun attrifyInt n = | 39 fun attrifyInt n = |
384 (if !bless s then | 385 (if !bless s then |
385 () | 386 () |
386 else | 387 else |
387 ErrorMsg.errorAt loc "Invalid URL passed to 'bless'"; | 388 ErrorMsg.errorAt loc "Invalid URL passed to 'bless'"; |
388 se) | 389 se) |
390 | EFfiApp ("Basis", "blessMime", [(se as EPrim (Prim.String s), loc)]) => | |
391 (if !blessMime s then | |
392 () | |
393 else | |
394 ErrorMsg.errorAt loc "Invalid string passed to 'blessMime'"; | |
395 se) | |
389 | 396 |
390 | EFfiApp ("Basis", "checkString", [(EPrim (Prim.String s), loc)]) => | 397 | EFfiApp ("Basis", "checkString", [(EPrim (Prim.String s), loc)]) => |
391 let | 398 let |
392 fun uwify (cs, acc) = | 399 fun uwify (cs, acc) = |
393 case cs of | 400 case cs of |