aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/lib.ml
diff options
context:
space:
mode:
Diffstat (limited to 'library/lib.ml')
-rw-r--r--library/lib.ml18
1 files changed, 9 insertions, 9 deletions
diff --git a/library/lib.ml b/library/lib.ml
index 749cc4ff3..954889fb6 100644
--- a/library/lib.ml
+++ b/library/lib.ml
@@ -416,12 +416,12 @@ let check_same_poly p vars =
if List.exists pred vars then
error "Cannot mix universe polymorphic and monomorphic declarations in sections."
-let add_section_variable id impl poly ctx =
+let add_section_variable id impl ~polymorphic ctx =
match !sectab with
| [] -> () (* because (Co-)Fixpoint temporarily uses local vars *)
| (vars,repl,abs)::sl ->
- List.iter (fun tab -> check_same_poly poly (pi1 tab)) !sectab;
- sectab := (Variable (id,impl,poly,ctx)::vars,repl,abs)::sl
+ List.iter (fun tab -> check_same_poly polymorphic (pi1 tab)) !sectab;
+ sectab := (Variable (id,impl,polymorphic,ctx)::vars,repl,abs)::sl
let add_section_context ctx =
match !sectab with
@@ -450,11 +450,11 @@ let instance_from_variable_context =
let named_of_variable_context =
List.map fst
-let add_section_replacement f g poly hyps =
+let add_section_replacement f g ~polymorphic hyps =
match !sectab with
| [] -> ()
| (vars,exps,abs)::sl ->
- let () = check_same_poly poly vars in
+ let () = check_same_poly polymorphic vars in
let sechyps,ctx = extract_hyps (vars,hyps) in
let ctx = Univ.ContextSet.to_context ctx in
let subst, ctx = Univ.abstract_universes true ctx in
@@ -462,13 +462,13 @@ let add_section_replacement f g poly hyps =
sectab := (vars,f (Univ.UContext.instance ctx,args) exps,
g (sechyps,subst,ctx) abs)::sl
-let add_section_kn poly kn =
+let add_section_kn ~polymorphic kn =
let f x (l1,l2) = (l1,Names.Mindmap.add kn x l2) in
- add_section_replacement f f poly
+ add_section_replacement f f ~polymorphic
-let add_section_constant poly kn =
+let add_section_constant ~polymorphic kn =
let f x (l1,l2) = (Names.Cmap.add kn x l1,l2) in
- add_section_replacement f f poly
+ add_section_replacement f f ~polymorphic
let replacement_context () = pi2 (List.hd !sectab)