comparison src/cjrize.sml @ 1075:0657e5adc938

Convert to task syntax
author Adam Chlipala <adamc@hcoop.net>
date Tue, 15 Dec 2009 10:19:05 -0500
parents b2311dfb3158
children 72670131dace
comparison
equal deleted inserted replaced
1074:d89f98f0b4bb 1075:0657e5adc938
658 end 658 end
659 | L.DDatabase s => (SOME (L'.DDatabase s, loc), NONE, sm) 659 | L.DDatabase s => (SOME (L'.DDatabase s, loc), NONE, sm)
660 | L.DJavaScript s => (SOME (L'.DJavaScript s, loc), NONE, sm) 660 | L.DJavaScript s => (SOME (L'.DJavaScript s, loc), NONE, sm)
661 | L.DCookie args => (SOME (L'.DCookie args, loc), NONE, sm) 661 | L.DCookie args => (SOME (L'.DCookie args, loc), NONE, sm)
662 | L.DStyle args => (SOME (L'.DStyle args, loc), NONE, sm) 662 | L.DStyle args => (SOME (L'.DStyle args, loc), NONE, sm)
663 | L.DInitializer e => 663 | L.DTask (e1, e2) =>
664 (case #1 e of 664 (case #1 e2 of
665 L.EAbs (_, _, _, e) => 665 L.EAbs (_, _, _, e) =>
666 let 666 let
667 val tk = case #1 e1 of
668 L.EFfi ("Basis", "initialize") => L'.Initialize
669 | _ => (ErrorMsg.errorAt loc "Task kind not fully determined";
670 L'.Initialize)
667 val (e, sm) = cifyExp (e, sm) 671 val (e, sm) = cifyExp (e, sm)
668 in 672 in
669 (SOME (L'.DInitializer e, loc), NONE, sm) 673 (SOME (L'.DTask (tk, e), loc), NONE, sm)
670 end 674 end
671 | _ => (ErrorMsg.errorAt loc "Initializer has not been fully determined"; 675 | _ => (ErrorMsg.errorAt loc "Initializer has not been fully determined";
672 (NONE, NONE, sm))) 676 (NONE, NONE, sm)))
673 677
674 fun cjrize ds = 678 fun cjrize ds =