comparison src/monoize.sml @ 670:f73913d97a40

Proper recv
author Adam Chlipala <adamc@hcoop.net>
date Sun, 22 Mar 2009 16:03:45 -0400
parents b0c1a46b1f15
children e0c186464612
comparison
equal deleted inserted replaced
669:f68eee90dbcf 670:f73913d97a40
975 (L'.ERecord [], loc)), loc), 975 (L'.ERecord [], loc)), loc),
976 (L'.EApp ( 976 (L'.EApp (
977 (L'.EApp ((L'.ERel 2, loc), (L'.ERel 0, loc)), loc), 977 (L'.EApp ((L'.ERel 2, loc), (L'.ERel 0, loc)), loc),
978 (L'.ERecord [], loc)), 978 (L'.ERecord [], loc)),
979 loc)), loc)), loc)), loc)), loc), 979 loc)), loc)), loc)), loc)), loc),
980 fm)
981 end
982 | L.EApp ((L.EApp ((L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "bind"), _), _), _), _), _), t2), _),
983 (L.EFfi ("Basis", "transaction_monad"), _)), _),
984 (L.EApp ((L.ECApp ((L.EFfi ("Basis", "recv"), _), t1), _),
985 ch), loc)) =>
986 let
987 val t1 = monoType env t1
988 val t2 = monoType env t2
989 val un = (L'.TRecord [], loc)
990 val mt2 = (L'.TFun (un, t2), loc)
991 val (ch, fm) = monoExp (env, st, fm) ch
992 in
993 ((L'.EAbs ("m2", (L'.TFun (t1, mt2), loc), (L'.TFun (un, un), loc),
994 (L'.EAbs ("_", un, un,
995 (L'.ERecv (liftExpInExp 0 (liftExpInExp 0 ch),
996 (L'.ERel 1, loc),
997 t1), loc)), loc)), loc),
980 fm) 998 fm)
981 end 999 end
982 1000
983 | L.ECApp ((L.EFfi ("Basis", "source"), _), t) => 1001 | L.ECApp ((L.EFfi ("Basis", "source"), _), t) =>
984 let 1002 let