Module Declare.Hook

Declaration hooks, to be run when a constant is saved. Use with care, as imperative effects may become not supported in the future.

type 'a g
type t = unit g
module S : sig ... end

Hooks allow users of the API to perform arbitrary actions at proof/definition saving time. For example, to register a constant as a Coercion, perform some cleanup, update the search database, etc...

val make_g : (S.t -> 'a -> 'a) -> 'a g
val make : (S.t -> unit) -> t
val call : ?hook:t -> S.t -> unit