diff options
| author | Matthieu Sozeau | 2016-04-04 14:49:06 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2016-04-04 14:49:06 +0200 |
| commit | 16536fd734d6a7aaa6ff85f56cef629df74ce36a (patch) | |
| tree | a9ffc8d0830c7c826ea164b5267f95985365fe63 /interp/constrintern.ml | |
| parent | 5569a06d062f913c66cbcb8bd01d4505e603d321 (diff) | |
| parent | 6aa58955515dff338ea85d59073dfc0d0c7648ab (diff) | |
Merge branch 'trunk-function_scope' of https://github.com/JasonGross/coq into JasonGross-trunk-function_scope
Diffstat (limited to 'interp/constrintern.ml')
| -rw-r--r-- | interp/constrintern.ml | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml index fa38695705..a5ee4ce2ec 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -300,7 +300,7 @@ let set_var_scope loc id istermvar env ntnvars = (* Not in a notation *) () -let set_type_scope env = {env with tmp_scope = Some Notation.type_scope} +let set_type_scope env = {env with tmp_scope = Notation.current_type_scope_name ()} let reset_tmp_scope env = {env with tmp_scope = None} @@ -451,12 +451,15 @@ let intern_generalization intern env lvar loc bk ak c = | Some AbsPi -> true | Some _ -> false | None -> - let is_type_scope = match env.tmp_scope with + match Notation.current_type_scope_name () with + | Some type_scope -> + let is_type_scope = match env.tmp_scope with + | None -> false + | Some sc -> String.equal sc type_scope + in + is_type_scope || + String.List.mem type_scope env.scopes | None -> false - | Some sc -> String.equal sc Notation.type_scope - in - is_type_scope || - String.List.mem Notation.type_scope env.scopes in if pi then (fun (id, loc') acc -> @@ -1755,7 +1758,7 @@ let extract_ids env = Id.Set.empty let scope_of_type_kind = function - | IsType -> Some Notation.type_scope + | IsType -> Notation.current_type_scope_name () | OfType typ -> compute_type_scope typ | WithoutTypeConstraint -> None |
