aboutsummaryrefslogtreecommitdiff
path: root/plugins/funind/indfun_common.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2019-06-17 04:34:06 +0200
committerEmilio Jesus Gallego Arias2019-06-26 01:15:49 +0200
commit81494db46137b2934167ae12d0b86e27e28023e9 (patch)
treead2a7b85cde2409debfd5f0650c3b70c467c7a7a /plugins/funind/indfun_common.ml
parent2433d810b9850d25819f97643664a851d29d2e0f (diff)
[declare] Fine tuning of Hook type.
We turn the hook parameter into a record, making more explicit the capture of data in hooks as they only take one parameter now This is a fine-tuning but provides some small advantages, and allows us to tweak the hook type with less breakage.
Diffstat (limited to 'plugins/funind/indfun_common.ml')
-rw-r--r--plugins/funind/indfun_common.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/funind/indfun_common.ml b/plugins/funind/indfun_common.ml
index 254760cb50..56ed406e2f 100644
--- a/plugins/funind/indfun_common.ml
+++ b/plugins/funind/indfun_common.ml
@@ -123,9 +123,9 @@ open DeclareDef
let definition_message = Declare.definition_message
-let save id const ?hook uctx locality kind =
+let save id const ?hook uctx scope kind =
let fix_exn = Future.fix_exn_of const.Proof_global.proof_entry_body in
- let r = match locality with
+ let r = match scope with
| Discharge ->
let k = Kindops.logical_kind_of_goal_kind kind in
let c = SectionLocalDef const in
@@ -136,7 +136,7 @@ let save id const ?hook uctx locality kind =
let kn = declare_constant id ~local (Declare.DefinitionEntry const, k) in
ConstRef kn
in
- DeclareDef.Hook.call ?hook ~fix_exn uctx [] locality r;
+ DeclareDef.Hook.(call ?hook ~fix_exn { S.uctx; obls = []; scope; dref = r });
definition_message id
let with_full_print f a =