diff options
author | 2009-03-22 16:03:45 -0400 | |
---|---|---|
committer | 2009-03-22 16:03:45 -0400 | |
commit | e2f6b11fd4fc806c5cdf88cf669ed5b2d9e34caf (patch) | |
tree | e2cac8cf9ae665630df1564c8942ad1d84484ac0 /src/monoize.sml | |
parent | bac67ca0f668cd381205b243355da8c906c58b5b (diff) |
Proper recv
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index d6b5ae15..87530070 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -979,6 +979,24 @@ fun monoExp (env, st, fm) (all as (e, loc)) = 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), _), + ch), loc)) => + let + val t1 = monoType env t1 + val t2 = monoType env t2 + val un = (L'.TRecord [], loc) + val mt2 = (L'.TFun (un, t2), loc) + val (ch, fm) = monoExp (env, st, fm) ch + in + ((L'.EAbs ("m2", (L'.TFun (t1, mt2), loc), (L'.TFun (un, un), loc), + (L'.EAbs ("_", un, un, + (L'.ERecv (liftExpInExp 0 (liftExpInExp 0 ch), + (L'.ERel 1, loc), + t1), loc)), loc)), loc), + fm) + end | L.ECApp ((L.EFfi ("Basis", "source"), _), t) => let |