comparison src/elaborate.sml @ 1554:396e8d881205

Better detection of type class witnesses in local bindings
author Adam Chlipala <adam@chlipala.net>
date Sat, 03 Sep 2011 08:57:13 -0400
parents 7efcf8f4a44a
children c7d0328ba777
comparison
equal deleted inserted replaced
1553:4105f779de7b 1554:396e8d881205
2181 let 2181 let
2182 val ((p', pt), (env', _)) = elabPat (p, (env, SS.empty)) 2182 val ((p', pt), (env', _)) = elabPat (p, (env, SS.empty))
2183 val (e', et, gs1) = elabExp (env, denv) e 2183 val (e', et, gs1) = elabExp (env, denv) e
2184 2184
2185 val () = checkCon env e' et pt 2185 val () = checkCon env e' et pt
2186
2187 val env' = E.patBinds env p'
2188 (* Redo to get proper detection of type class witnesses *)
2186 2189
2187 val pt = normClassConstraint env pt 2190 val pt = normClassConstraint env pt
2188 in 2191 in
2189 case exhaustive (env, et, [p'], loc) of 2192 case exhaustive (env, et, [p'], loc) of
2190 NONE => () 2193 NONE => ()