aboutsummaryrefslogtreecommitdiff
path: root/vernac
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-12-01 18:57:23 +0100
committerGaëtan Gilbert2019-12-01 18:57:23 +0100
commit73f329333c6123a512ca975da949bec3778ce151 (patch)
treeda378af9ffe7901e046faa7af62135a1f2232f68 /vernac
parentc0d116209fdda0858b182000a19ebfeacd2b1b83 (diff)
parent412b5ba92f3c76c6bdb7dada0ef7be62f72518a8 (diff)
Merge PR #11185: Remove deprecated Typeclasses Axioms Are Instances.
Reviewed-by: SkySkimmer Reviewed-by: cpitclaudel
Diffstat (limited to 'vernac')
-rw-r--r--vernac/comAssumption.ml25
1 files changed, 6 insertions, 19 deletions
diff --git a/vernac/comAssumption.ml b/vernac/comAssumption.ml
index e5db6146ca..a001420f74 100644
--- a/vernac/comAssumption.ml
+++ b/vernac/comAssumption.ml
@@ -22,24 +22,6 @@ open Entries
module RelDecl = Context.Rel.Declaration
(* 2| Variable/Hypothesis/Parameter/Axiom declarations *)
-let axiom_into_instance = ref false
-
-let () =
- let open Goptions in
- declare_bool_option
- { optdepr = true;
- optname = "automatically declare axioms whose type is a typeclass as instances";
- optkey = ["Typeclasses";"Axioms";"Are";"Instances"];
- optread = (fun _ -> !axiom_into_instance);
- optwrite = (:=) axiom_into_instance; }
-
-let should_axiom_into_instance = let open Decls in function
- | Context ->
- (* The typeclass behaviour of Variable and Context doesn't depend
- on section status *)
- true
- | Definitional | Logical | Conjectural -> !axiom_into_instance
-
let declare_variable is_coe ~kind typ imps impl {CAst.v=name} =
let kind = Decls.IsAssumption kind in
let decl = Declare.SectionLocalAssum {typ; impl} in
@@ -58,7 +40,12 @@ let instance_of_univ_entry = function
| Monomorphic_entry _ -> Univ.Instance.empty
let declare_axiom is_coe ~poly ~local ~kind typ (univs, pl) imps nl {CAst.v=name} =
- let do_instance = should_axiom_into_instance kind in
+ let do_instance = let open Decls in match kind with
+ | Context -> true
+ (* The typeclass behaviour of Variable and Context doesn't depend
+ on section status *)
+ | Definitional | Logical | Conjectural -> false
+ in
let inl = let open Declaremods in match nl with
| NoInline -> None
| DefaultInline -> Some (Flags.get_inline_level())