comparison src/elaborate.sml @ 1074:d89f98f0b4bb

Fixing a bug in DInitializer elaboration
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Dec 2009 14:34:18 -0500
parents b2311dfb3158
children 0657e5adc938
comparison
equal deleted inserted replaced
1073:b2311dfb3158 1074:d89f98f0b4bb
3669 in 3669 in
3670 ([(L'.DStyle (!basis_r, x, n), loc)], (env, denv, gs)) 3670 ([(L'.DStyle (!basis_r, x, n), loc)], (env, denv, gs))
3671 end 3671 end
3672 | L.DInitializer e => 3672 | L.DInitializer e =>
3673 let 3673 let
3674 val (e', t, gs) = elabExp (env, denv) e 3674 val (e', t, gs') = elabExp (env, denv) e
3675 val t' = (L'.CApp ((L'.CModProj (!basis_r, [], "transaction"), loc), 3675 val t' = (L'.CApp ((L'.CModProj (!basis_r, [], "transaction"), loc),
3676 (L'.TRecord (L'.CRecord ((L'.KType, loc), []), loc), loc)), loc) 3676 (L'.TRecord (L'.CRecord ((L'.KType, loc), []), loc), loc)), loc)
3677 in 3677 in
3678 checkCon env e' t t'; 3678 checkCon env e' t t';
3679 ([(L'.DInitializer e', loc)], (env, denv, gs)) 3679 ([(L'.DInitializer e', loc)], (env, denv, gs' @ gs))
3680 end 3680 end
3681 3681
3682 (*val tcs = List.filter (fn TypeClass _ => true | _ => false) (#3 (#2 r))*) 3682 (*val tcs = List.filter (fn TypeClass _ => true | _ => false) (#3 (#2 r))*)
3683 in 3683 in
3684 (*prefaces "/elabDecl" [("d", SourcePrint.p_decl dAll)];*) 3684 (*prefaces "/elabDecl" [("d", SourcePrint.p_decl dAll)];*)