aboutsummaryrefslogtreecommitdiff
path: root/vernac/declareDef.mli
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-03-18 05:35:41 -0400
committerEmilio Jesus Gallego Arias2020-03-30 19:05:38 -0400
commit7d46a32dc928af64e3e111d6d62caa00f93c427c (patch)
treebd49b527bd2ebcdebd1e16526d136bf9f5b0e651 /vernac/declareDef.mli
parent9e3c7d4c0babf3b69c8646351ca7069704df345d (diff)
[declare] Fuse prepare and declare for the non-interactive path.
This will allow to share the definition metadata for example with obligations; a bit more work is needed to finally move the preparation of interactive proofs from Proof_global to `prepare_entry`.
Diffstat (limited to 'vernac/declareDef.mli')
-rw-r--r--vernac/declareDef.mli47
1 files changed, 26 insertions, 21 deletions
diff --git a/vernac/declareDef.mli b/vernac/declareDef.mli
index 8f3db59ba9..3bc1e25f19 100644
--- a/vernac/declareDef.mli
+++ b/vernac/declareDef.mli
@@ -39,23 +39,39 @@ module Hook : sig
val call : ?hook:t -> S.t -> unit
end
-module ClosedDef : sig
- type t
-
- (* Don't use for non-interactive proofs *)
- val of_proof_entry
- : uctx:UState.t
- -> Evd.side_effects Declare.proof_entry -> t
-end
+(** Declare an interactively-defined constant *)
+val declare_entry
+ : name:Id.t
+ -> scope:locality
+ -> kind:Decls.logical_kind
+ -> ?hook:Hook.t
+ -> ?obls:(Id.t * Constr.t) list
+ -> impargs:Impargs.manual_implicits
+ -> uctx:UState.t
+ -> Evd.side_effects Declare.proof_entry
+ -> GlobRef.t
+(** Declares a non-interactive constant; [body] and [types] will be
+ normalized w.r.t. the passed [evar_map] [sigma]. Universes should
+ be handled properly, including minimization and restriction. Note
+ that [sigma] is checked for unresolved evars, thus you should be
+ careful not to submit open terms or evar maps with stale,
+ unresolved existentials *)
val declare_definition
: name:Id.t
-> scope:locality
-> kind:Decls.logical_kind
+ -> opaque:bool
+ -> impargs:Impargs.manual_implicits
+ -> udecl:UState.universe_decl
-> ?hook:Hook.t
-> ?obls:(Id.t * Constr.t) list
- -> impargs:Impargs.manual_implicits
- -> ClosedDef.t
+ -> poly:bool
+ -> ?inline:bool
+ -> types:EConstr.t option
+ -> body:EConstr.t
+ -> ?fix_exn:(Exninfo.iexn -> Exninfo.iexn)
+ -> Evd.evar_map
-> GlobRef.t
val declare_assumption
@@ -97,17 +113,6 @@ val declare_mutually_recursive
-> Recthm.t list
-> Names.GlobRef.t list
-val prepare_definition
- : ?opaque:bool
- -> ?inline:bool
- -> ?fix_exn:(Exninfo.iexn -> Exninfo.iexn)
- -> poly:bool
- -> udecl:UState.universe_decl
- -> types:EConstr.t option
- -> body:EConstr.t
- -> Evd.evar_map
- -> ClosedDef.t
-
val prepare_obligation
: ?opaque:bool
-> ?inline:bool