summaryrefslogtreecommitdiff
path: root/src/expl_env.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-06-13 14:13:06 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-06-13 14:13:06 -0400
commitfdce2b90afbf31a31b312e52c0fc97434e9638a8 (patch)
tree5dced3d3a8af23f27538d99bc31bcf107222a15a /src/expl_env.sml
parentab23256c70d97509cf4dea53fd9ec8969966cfa9 (diff)
Catch a missed ReduceLocal of field projection annotations
Diffstat (limited to 'src/expl_env.sml')
-rw-r--r--src/expl_env.sml11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/expl_env.sml b/src/expl_env.sml
index 583e4881..9abe7099 100644
--- a/src/expl_env.sml
+++ b/src/expl_env.sml
@@ -1,4 +1,4 @@
-(* Copyright (c) 2008, Adam Chlipala
+(* Copyright (c) 2008-2010, Adam Chlipala
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -400,4 +400,13 @@ fun sgiBinds env (sgi, loc) =
| SgiSgn (x, n, sgn) => pushSgnNamed env x n sgn
| SgiStr (x, n, sgn) => pushStrNamed env x n sgn
+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