aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-05-16 16:49:03 +0200
committerGaëtan Gilbert2019-05-21 12:44:30 +0200
commitf80f7c49cc9fb40b493be5cad787bd4b8f8fb717 (patch)
tree54dde1d9352e99afce16755199f9331bfb758ea0 /plugins
parent02d6f5660d54fcf4dfc9cff36cbda41dca3f601f (diff)
Remove undocumented Instance : ! syntax
It's used a few times in the stdlib (a couple of which need no other change when removing the !) and not at all throughout our CI. Considering that I think it's fair enough to remove it.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ltac/rewrite.ml25
1 files changed, 13 insertions, 12 deletions
diff --git a/plugins/ltac/rewrite.ml b/plugins/ltac/rewrite.ml
index 963b7189f9..5db8f999e5 100644
--- a/plugins/ltac/rewrite.ml
+++ b/plugins/ltac/rewrite.ml
@@ -30,7 +30,6 @@ open Evd
open Tactypes
open Locus
open Locusops
-open Decl_kinds
open Elimschemes
open Environ
open Termops
@@ -1791,15 +1790,15 @@ let rec strategy_of_ast = function
let mkappc s l = CAst.make @@ CAppExpl ((None,qualid_of_ident (Id.of_string s),None),l)
let declare_an_instance n s args =
- (((CAst.make @@ Name n),None), Explicit,
+ (((CAst.make @@ Name n),None),
CAst.make @@ CAppExpl ((None, qualid_of_string s,None), args))
let declare_instance a aeq n s = declare_an_instance n s [a;aeq]
-let anew_instance ~pstate atts binders instance fields =
+let anew_instance ~pstate atts binders (name,t) fields =
let program_mode = atts.program in
new_instance ~pstate ~program_mode atts.polymorphic
- binders instance (Some (true, CAst.make @@ CRecord (fields)))
+ name binders t (Some (true, CAst.make @@ CRecord (fields)))
~global:atts.global ~generalize:false Hints.empty_hint_info
let declare_instance_refl ~pstate atts binders a aeq n lemma =
@@ -2014,16 +2013,18 @@ let add_morphism_infer ~pstate atts m n : Proof_global.t option =
let add_morphism ~pstate atts binders m s n =
init_setoid ();
let instance_id = add_suffix n "_Proper" in
- let instance =
- (((CAst.make @@ Name instance_id),None), Explicit,
- CAst.make @@ CAppExpl (
- (None, Libnames.qualid_of_string "Coq.Classes.Morphisms.Proper",None),
- [cHole; s; m]))
+ let instance_name = (CAst.make @@ Name instance_id),None in
+ let instance_t =
+ CAst.make @@ CAppExpl
+ ((None, Libnames.qualid_of_string "Coq.Classes.Morphisms.Proper",None),
+ [cHole; s; m])
in
let tac = Tacinterp.interp (make_tactic "add_morphism_tactic") in
- let _, pstate = new_instance ~pstate ~program_mode:atts.program ~global:atts.global atts.polymorphic binders instance
- None
- ~generalize:false ~tac ~hook:(declare_projection n instance_id) Hints.empty_hint_info in
+ let _, pstate = new_instance ~pstate
+ ~program_mode:atts.program ~global:atts.global atts.polymorphic
+ instance_name binders instance_t None
+ ~generalize:false ~tac ~hook:(declare_projection n instance_id) Hints.empty_hint_info
+ in
pstate
(** Bind to "rewrite" too *)