aboutsummaryrefslogtreecommitdiff
path: root/tactics/hints.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-10-02 18:41:39 +0200
committerPierre-Marie Pédrot2020-11-04 13:43:57 +0100
commit511a3eae36d3b57afbbb37b586ef71adf094f8ca (patch)
treea872f16ec4ad0f16b4c906483c712f08c376ca4c /tactics/hints.ml
parentae4346d74acf0d3e48a9660758dd7c064d14f749 (diff)
Encapsulate the last use of IsConstr in the Hints API.
Diffstat (limited to 'tactics/hints.ml')
-rw-r--r--tactics/hints.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/tactics/hints.ml b/tactics/hints.ml
index 0170487b2e..b8bd459616 100644
--- a/tactics/hints.ml
+++ b/tactics/hints.ml
@@ -1347,6 +1347,14 @@ let add_hints ~locality dbnames h =
| HintsExternEntry (info, tacexp) ->
add_externs info tacexp ~local ~superglobal dbnames
+let hint_constr env sigma ~poly c =
+ let c, diff = prepare_hint true env sigma c in
+ let diff, uctx =
+ if poly then Some diff, Univ.ContextSet.empty
+ else None, diff
+ in
+ IsConstr (c, diff), uctx
+
let expand_constructor_hints env sigma lems =
List.map_append (fun (evd,lem) ->
match EConstr.kind sigma lem with