diff options
| author | Emilio Jesus Gallego Arias | 2019-06-17 04:34:06 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-06-26 01:15:49 +0200 |
| commit | 81494db46137b2934167ae12d0b86e27e28023e9 (patch) | |
| tree | ad2a7b85cde2409debfd5f0650c3b70c467c7a7a /vernac/declareDef.mli | |
| parent | 2433d810b9850d25819f97643664a851d29d2e0f (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 'vernac/declareDef.mli')
| -rw-r--r-- | vernac/declareDef.mli | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/vernac/declareDef.mli b/vernac/declareDef.mli index 3934a29413..cfff89bc34 100644 --- a/vernac/declareDef.mli +++ b/vernac/declareDef.mli @@ -22,23 +22,22 @@ module Hook : sig as a Coercion, perform some cleanup, update the search database, etc... *) module S : sig - (** [S.t] passes to the client: *) - type t - = UState.t + type t = + { uctx : UState.t (** [ustate]: universe constraints obtained when the term was closed *) - -> (Id.t * Constr.t) list + ; obls : (Id.t * Constr.t) list (** [(n1,t1),...(nm,tm)]: association list between obligation name and the corresponding defined term (might be a constant, but also an arbitrary term in the Expand case of obligations) *) - -> locality - (** [locality]: Locality of the original declaration *) - -> GlobRef.t - (** [ref]: identifier of the original declaration *) - -> unit + ; scope : locality + (** [scope]: Locality of the original declaration *) + ; dref : GlobRef.t + (** [dref]: identifier of the original declaration *) + } end - val make : S.t -> t - val call : ?hook:t -> ?fix_exn:Future.fix_exn -> S.t + val make : (S.t -> unit) -> t + val call : ?hook:t -> ?fix_exn:Future.fix_exn -> S.t -> unit end val declare_definition |
