diff 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
line wrap: on
line diff
--- a/src/cjrize.sml	Sun Dec 13 14:34:18 2009 -0500
+++ b/src/cjrize.sml	Tue Dec 15 10:19:05 2009 -0500
@@ -660,13 +660,17 @@
       | L.DJavaScript s => (SOME (L'.DJavaScript s, loc), NONE, sm)
       | L.DCookie args => (SOME (L'.DCookie args, loc), NONE, sm)
       | L.DStyle args => (SOME (L'.DStyle args, loc), NONE, sm)
-      | L.DInitializer e =>
-        (case #1 e of
+      | L.DTask (e1, e2) =>
+        (case #1 e2 of
              L.EAbs (_, _, _, e) =>
              let
+                 val tk = case #1 e1 of
+                              L.EFfi ("Basis", "initialize") => L'.Initialize
+                            | _ => (ErrorMsg.errorAt loc "Task kind not fully determined";
+                                    L'.Initialize)
                  val (e, sm) = cifyExp (e, sm)
              in
-                 (SOME (L'.DInitializer e, loc), NONE, sm)
+                 (SOME (L'.DTask (tk, e), loc), NONE, sm)
              end
            | _ => (ErrorMsg.errorAt loc "Initializer has not been fully determined";
                    (NONE, NONE, sm)))