aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2016-06-15 01:32:27 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2016-06-16 18:21:08 +0200
commit27d169e82ed3068e6119ff0548f3b6e93854a6bc (patch)
tree6231d44d9d5308963976c3c6c4d73940ffc32342 /tactics
parentd7283b37ddba514d29b977866058dabf45b464e7 (diff)
Put autoapply back, lost during rebase
Diffstat (limited to 'tactics')
-rw-r--r--tactics/class_tactics.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tactics/class_tactics.ml b/tactics/class_tactics.ml
index 9f0da47b9..813dcaf08 100644
--- a/tactics/class_tactics.ml
+++ b/tactics/class_tactics.ml
@@ -1489,3 +1489,12 @@ let not_evar c = match kind_of_term c with
let is_ground c gl =
if Evarutil.is_ground_term (project gl) c then tclIDTAC gl
else tclFAIL 0 (str"Not ground") gl
+
+let autoapply c i gl =
+ let flags = auto_unif_flags Evar.Set.empty
+ (Hints.Hint_db.transparent_state (Hints.searchtable_map i)) in
+ let cty = pf_unsafe_type_of gl c in
+ let ce = mk_clenv_from gl (c,cty) in
+ let tac = { enter = fun gl -> (unify_e_resolve false flags).enter gl
+ ((c,cty,Univ.ContextSet.empty),0,ce) } in
+ Proofview.V82.of_tactic (Proofview.Goal.nf_enter tac) gl