summaryrefslogtreecommitdiff
path: root/src/elab_env.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-28 14:48:33 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-28 14:48:33 -0400
commit508290e29047e068b9db4b02485fefd9e3ced81c (patch)
treed3fc8eec392562fbb5c15d431c4b7e3ff8d6a824 /src/elab_env.sml
parent6cc9b62f90276ce8535ead07a3865cd71d98a526 (diff)
Transactions and queries, at source level
Diffstat (limited to 'src/elab_env.sml')
-rw-r--r--src/elab_env.sml9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/elab_env.sml b/src/elab_env.sml
index 936d8fce..a1a68974 100644
--- a/src/elab_env.sml
+++ b/src/elab_env.sml
@@ -1049,4 +1049,13 @@ fun declBinds env (d, loc) =
pushClass env n
end
+fun patBinds env (p, loc) =
+ case p of
+ PWild => env
+ | PVar (x, t) => pushERel env x t
+ | PPrim _ => env
+ | PCon (_, _, _, NONE) => env
+ | PCon (_, _, _, SOME p) => patBinds env p
+ | PRecord xps => foldl (fn ((_, p, _), env) => patBinds env p) env xps
+
end