comparison src/elaborate.sml @ 822:d4e811beb8eb

fn-pattern code in but not tested yet; hello compiles
author Adam Chlipala <adamc@hcoop.net>
date Thu, 28 May 2009 10:16:50 -0400
parents 395a5d450cc0
children 7f871c03e3a1
comparison
equal deleted inserted replaced
821:395a5d450cc0 822:d4e811beb8eb
1289 in 1289 in
1290 (((L'.PRecord xpts, loc), 1290 (((L'.PRecord xpts, loc),
1291 (L'.TRecord c, loc)), 1291 (L'.TRecord c, loc)),
1292 (env, bound)) 1292 (env, bound))
1293 end 1293 end
1294 1294
1295 | L.PAnnot (p, t) =>
1296 let
1297 val ((p', pt), (env, bound)) = elabPat (p, (env, bound))
1298 val (t', k, _) = elabCon (env, D.empty) t
1299 in
1300 checkPatCon env p' pt t';
1301 ((p', t'), (env, bound))
1302 end
1295 end 1303 end
1296 1304
1297 (* This exhaustiveness checking follows Luc Maranget's paper "Warnings for pattern matching." *) 1305 (* This exhaustiveness checking follows Luc Maranget's paper "Warnings for pattern matching." *)
1298 fun exhaustive (env, t, ps, loc) = 1306 fun exhaustive (env, t, ps, loc) =
1299 let 1307 let