comparison src/elaborate.sml @ 1348:8a169fc0838b

Change tasks to support parametric code; add clientLeaves
author Adam Chlipala <adam@chlipala.net>
date Sat, 18 Dec 2010 14:17:45 -0500
parents b106ca8200b1
children 74d35d9a5d16
comparison
equal deleted inserted replaced
1347:b106ca8200b1 1348:8a169fc0838b
3960 | L.DTask (e1, e2) => 3960 | L.DTask (e1, e2) =>
3961 let 3961 let
3962 val (e1', t1, gs1) = elabExp (env, denv) e1 3962 val (e1', t1, gs1) = elabExp (env, denv) e1
3963 val (e2', t2, gs2) = elabExp (env, denv) e2 3963 val (e2', t2, gs2) = elabExp (env, denv) e2
3964 3964
3965 val targ = cunif (loc, (L'.KType, loc))
3966
3965 val t1' = (L'.CModProj (!basis_r, [], "task_kind"), loc) 3967 val t1' = (L'.CModProj (!basis_r, [], "task_kind"), loc)
3968 val t1' = (L'.CApp (t1', targ), loc)
3969
3966 val t2' = (L'.CApp ((L'.CModProj (!basis_r, [], "transaction"), loc), 3970 val t2' = (L'.CApp ((L'.CModProj (!basis_r, [], "transaction"), loc),
3967 (L'.TRecord (L'.CRecord ((L'.KType, loc), []), loc), loc)), loc) 3971 (L'.TRecord (L'.CRecord ((L'.KType, loc), []), loc), loc)), loc)
3972 val t2' = (L'.TFun (targ, t2'), loc)
3968 in 3973 in
3969 checkCon env e1' t1 t1'; 3974 checkCon env e1' t1 t1';
3970 checkCon env e2' t2 t2'; 3975 checkCon env e2' t2 t2';
3971 ([(L'.DTask (e1', e2'), loc)], (env, denv, gs2 @ gs1 @ gs)) 3976 ([(L'.DTask (e1', e2'), loc)], (env, denv, gs2 @ gs1 @ gs))
3972 end 3977 end