From 96e78e0d4ab9e2c2ccf1bb0565384e4e0d322904 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Fri, 22 Jun 2018 00:43:01 +0200 Subject: Move transparent_state to its own module. --- vernac/assumptions.mli | 2 +- vernac/vernacentries.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'vernac') diff --git a/vernac/assumptions.mli b/vernac/assumptions.mli index aead345d8c..56d6202194 100644 --- a/vernac/assumptions.mli +++ b/vernac/assumptions.mli @@ -28,5 +28,5 @@ val traverse : on which a term relies (together with their type). The above warning of {!traverse} also applies. *) val assumptions : - ?add_opaque:bool -> ?add_transparent:bool -> transparent_state -> + ?add_opaque:bool -> ?add_transparent:bool -> TranspState.t -> GlobRef.t -> constr -> types ContextObjectMap.t diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index 7a76fb9560..34ddf3377f 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -1096,7 +1096,7 @@ let vernac_restore_state file = (* Commands *) let vernac_create_hintdb ~module_local id b = - Hints.create_hint_db module_local id full_transparent_state b + Hints.create_hint_db module_local id TranspState.full b let vernac_remove_hints ~module_local dbs ids = Hints.remove_hints module_local dbs (List.map Smartlocate.global_with_alias ids) -- cgit v1.2.3 From ad5aea737ecc639c31dda84322b3550a4d380b47 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Fri, 22 Jun 2018 21:06:01 +0200 Subject: Proper record type and accessors for transparent states. This is documented in dev/doc/changes.md. --- vernac/assumptions.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vernac') diff --git a/vernac/assumptions.ml b/vernac/assumptions.ml index 6beac2032d..b51b6cedfb 100644 --- a/vernac/assumptions.ml +++ b/vernac/assumptions.ml @@ -294,7 +294,6 @@ let traverse current t = let type_of_constant cb = cb.Declarations.const_type let assumptions ?(add_opaque=false) ?(add_transparent=false) st gr t = - let (idts, knst) = st in (** Only keep the transitive dependencies *) let (_, graph, ax2ty) = traverse (label_of gr) t in let fold obj _ accu = match obj with @@ -316,7 +315,7 @@ let assumptions ?(add_opaque=false) ?(add_transparent=false) st gr t = let t = type_of_constant cb in let l = try GlobRef.Map_env.find obj ax2ty with Not_found -> [] in ContextObjectMap.add (Axiom (Constant kn,l)) t accu - else if add_opaque && (Declareops.is_opaque cb || not (Cpred.mem kn knst)) then + else if add_opaque && (Declareops.is_opaque cb || not (TranspState.is_transparent_constant st kn)) then let t = type_of_constant cb in ContextObjectMap.add (Opaque kn) t accu else if add_transparent then -- cgit v1.2.3 From 733cb74a2038ff92156b7209713fc2ea741ccca6 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 19 Nov 2018 08:12:28 +0100 Subject: Rename TranspState into TransparentState. --- vernac/assumptions.ml | 2 +- vernac/assumptions.mli | 2 +- vernac/vernacentries.ml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'vernac') diff --git a/vernac/assumptions.ml b/vernac/assumptions.ml index b51b6cedfb..3ca2a4ad6b 100644 --- a/vernac/assumptions.ml +++ b/vernac/assumptions.ml @@ -315,7 +315,7 @@ let assumptions ?(add_opaque=false) ?(add_transparent=false) st gr t = let t = type_of_constant cb in let l = try GlobRef.Map_env.find obj ax2ty with Not_found -> [] in ContextObjectMap.add (Axiom (Constant kn,l)) t accu - else if add_opaque && (Declareops.is_opaque cb || not (TranspState.is_transparent_constant st kn)) then + else if add_opaque && (Declareops.is_opaque cb || not (TransparentState.is_transparent_constant st kn)) then let t = type_of_constant cb in ContextObjectMap.add (Opaque kn) t accu else if add_transparent then diff --git a/vernac/assumptions.mli b/vernac/assumptions.mli index 56d6202194..536185f4aa 100644 --- a/vernac/assumptions.mli +++ b/vernac/assumptions.mli @@ -28,5 +28,5 @@ val traverse : on which a term relies (together with their type). The above warning of {!traverse} also applies. *) val assumptions : - ?add_opaque:bool -> ?add_transparent:bool -> TranspState.t -> + ?add_opaque:bool -> ?add_transparent:bool -> TransparentState.t -> GlobRef.t -> constr -> types ContextObjectMap.t diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index 34ddf3377f..7765f5b417 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -1096,7 +1096,7 @@ let vernac_restore_state file = (* Commands *) let vernac_create_hintdb ~module_local id b = - Hints.create_hint_db module_local id TranspState.full b + Hints.create_hint_db module_local id TransparentState.full b let vernac_remove_hints ~module_local dbs ids = Hints.remove_hints module_local dbs (List.map Smartlocate.global_with_alias ids) -- cgit v1.2.3