aboutsummaryrefslogtreecommitdiff
path: root/interp/constrintern.ml
diff options
context:
space:
mode:
authorJason Gross2015-06-24 15:41:11 +0200
committerJason Gross2015-08-14 02:49:31 -0400
commit6aa58955515dff338ea85d59073dfc0d0c7648ab (patch)
treeed472dbf020c22a3080bc5e13a398914875bca11 /interp/constrintern.ml
parent297b0cb44bbe8ec7304ca635c566815167266d4a (diff)
Move type_scope into user space, fix some output logs
Diffstat (limited to 'interp/constrintern.ml')
-rw-r--r--interp/constrintern.ml17
1 files changed, 10 insertions, 7 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index 8c56d0ccfe..d572508a15 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -298,7 +298,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}
@@ -449,12 +449,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