aboutsummaryrefslogtreecommitdiff
path: root/plugins/ltac
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2019-06-21 20:14:46 +0200
committerEmilio Jesus Gallego Arias2019-07-01 19:34:58 +0200
commit66e52c88076ba830c8c8b3cf8e4bb77959fb7843 (patch)
treeebb11957cdbad0e418ef7bb69cb75489c47ba6f6 /plugins/ltac
parentb78a4f8afc6180c1d435258af681d354e211cab2 (diff)
[api] Refactor most of `Decl_kinds`
We move the bulk of `Decl_kinds` to a better place [namely `interp/decls`] and refactor the use of this information quite a bit. The information seems to be used almost only for `Dumpglob`, so it certainly should end there to achieve a cleaner core. Note the previous commits, as well as the annotations regarding the dubious use of the "variable" data managed by the `Decls` file. IMO this needs more work, but this should be a good start.
Diffstat (limited to 'plugins/ltac')
-rw-r--r--plugins/ltac/rewrite.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/ltac/rewrite.ml b/plugins/ltac/rewrite.ml
index 19866df8e3..22ad75b784 100644
--- a/plugins/ltac/rewrite.ml
+++ b/plugins/ltac/rewrite.ml
@@ -1901,8 +1901,8 @@ let declare_projection n instance_id r =
let cst =
Declare.definition_entry ~types:typ ~univs term
in
- ignore(Declare.declare_constant n
- (Declare.DefinitionEntry cst, Decl_kinds.IsDefinition Decl_kinds.Definition))
+ ignore(Declare.declare_constant n
+ (Declare.DefinitionEntry cst, Decls.(IsDefinition Definition)))
let build_morphism_signature env sigma m =
let m,ctx = Constrintern.interp_constr env sigma m in
@@ -1981,7 +1981,7 @@ let add_morphism_as_parameter atts m n : unit =
let cst = Declare.declare_constant instance_id
(Declare.ParameterEntry
(None,(instance,uctx),None),
- Decl_kinds.IsAssumption Decl_kinds.Logical)
+ Decls.(IsAssumption Logical))
in
Classes.add_instance (Classes.mk_instance
(PropGlobal.proper_class env evd) Hints.empty_hint_info atts.global (ConstRef cst));
@@ -1995,7 +1995,7 @@ let add_morphism_interactive atts m n : Lemmas.t =
let evd = Evd.from_env env in
let uctx, instance = build_morphism_signature env evd m in
let poly = atts.polymorphic in
- let kind = Decl_kinds.DefinitionBody Decl_kinds.Instance in
+ let kind = Decls.(DefinitionBody Instance) in
let tac = make_tactic "Coq.Classes.SetoidTactics.add_morphism_tactic" in
let hook { DeclareDef.Hook.S.dref; _ } = dref |> function
| Globnames.ConstRef cst ->