diff src/monoize.sml @ 697:755a71c99be5

Threads demo
author Adam Chlipala <adamc@hcoop.net>
date Sun, 05 Apr 2009 10:48:11 -0400
parents 500e93aa436f
children 70cbdcf5989b
line wrap: on
line diff
--- a/src/monoize.sml	Sun Apr 05 09:26:00 2009 -0400
+++ b/src/monoize.sml	Sun Apr 05 10:48:11 2009 -0400
@@ -984,6 +984,7 @@
                                                           loc)), loc)), loc)), loc)), loc),
                  fm)
             end
+
           | L.EApp ((L.EApp ((L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "bind"), _), _), _), _), _), t2), _),
                              (L.EFfi ("Basis", "transaction_monad"), _)), _),
                     (L.EApp ((L.ECApp ((L.EFfi ("Basis", "recv"), _), t1), _),
@@ -1002,6 +1003,8 @@
                                                 t1), loc)), loc)), loc),
                  fm)
             end
+          | L.EFfiApp ("Basis", "recv", _) => poly ()
+
           | L.EApp ((L.EApp ((L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "bind"), _), _), _), _), _), t2), _),
                              (L.EFfi ("Basis", "transaction_monad"), _)), _),
                     (L.EAbs (_, _, _,
@@ -1014,11 +1017,12 @@
             in
                 ((L'.EAbs ("m2", (L'.TFun (un, mt2), loc), (L'.TFun (un, un), loc),
                            (L'.EAbs ("_", un, un,
-                                     (L'.ESleep (n, (L'.EApp ((L'.ERel 1, loc),
+                                     (L'.ESleep (liftExpInExp 0 n, (L'.EApp ((L'.ERel 1, loc),
                                                               (L'.ERecord [], loc)), loc)),
                                       loc)), loc)), loc),
                  fm)
             end
+          | L.EFfiApp ("Basis", "sleep", _) => poly ()
 
           | L.ECApp ((L.EFfi ("Basis", "source"), _), t) =>
             let