comparison src/elaborate.sml @ 2009:799be3911ce3

Monadic bind supports patterns
author Adam Chlipala <adam@chlipala.net>
date Fri, 02 May 2014 17:16:02 -0400
parents 7db8356caef5
children 403f0cc65b9c
comparison
equal deleted inserted replaced
2008:93ff76058825 2009:799be3911ce3
2181 val gs2 = D.prove env denv (c1, c2, loc) 2181 val gs2 = D.prove env denv (c1, c2, loc)
2182 in 2182 in
2183 (e', (#1 (chaseUnifs t'), loc), enD gs2 @ gs1) 2183 (e', (#1 (chaseUnifs t'), loc), enD gs2 @ gs1)
2184 end 2184 end
2185 2185
2186 | L.ERecord xes => 2186 | L.ERecord (xes, flex) =>
2187 let 2187 let
2188 val () = if flex then
2189 expError env (IllegalFlex eAll)
2190 else
2191 ()
2192
2188 val (xes', gs) = ListUtil.foldlMap (fn ((x, e), gs) => 2193 val (xes', gs) = ListUtil.foldlMap (fn ((x, e), gs) =>
2189 let 2194 let
2190 val (x', xk, gs1) = elabCon (env, denv) x 2195 val (x', xk, gs1) = elabCon (env, denv) x
2191 val (e', et, gs2) = elabExp (env, denv) e 2196 val (e', et, gs2) = elabExp (env, denv) e
2192 in 2197 in