aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/elaborate.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/elaborate.sml')
-rw-r--r--src/elaborate.sml10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml
index 49b826eb..6f8575db 100644
--- a/src/elaborate.sml
+++ b/src/elaborate.sml
@@ -1291,7 +1291,15 @@ fun elabPat (pAll as (p, loc), (env, bound)) =
(L'.TRecord c, loc)),
(env, bound))
end
-
+
+ | L.PAnnot (p, t) =>
+ let
+ val ((p', pt), (env, bound)) = elabPat (p, (env, bound))
+ val (t', k, _) = elabCon (env, D.empty) t
+ in
+ checkPatCon env p' pt t';
+ ((p', t'), (env, bound))
+ end
end
(* This exhaustiveness checking follows Luc Maranget's paper "Warnings for pattern matching." *)