aboutsummaryrefslogtreecommitdiff
path: root/doc/plugin_tutorial/tuto1/src/simple_declare.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-06-25 17:26:44 +0200
committerPierre-Marie Pédrot2019-06-25 17:26:44 +0200
commit7dfcb0f7c817e66280ab37b6c653b5596a16c249 (patch)
treef59cbad4ef2e56070fe32fefcc5f7a3f8c6b7a4a /doc/plugin_tutorial/tuto1/src/simple_declare.ml
parent7024688c4e20fa7b70ac1c550c166d02fce8d15c (diff)
parentc2abcaefd796b7f430f056884349b9d959525eec (diff)
Merge PR #10316: [lemmas] Reify info for implicits, universe decls, and rec theorems.
Reviewed-by: SkySkimmer Ack-by: ejgallego Reviewed-by: gares Reviewed-by: ppedrot
Diffstat (limited to 'doc/plugin_tutorial/tuto1/src/simple_declare.ml')
-rw-r--r--doc/plugin_tutorial/tuto1/src/simple_declare.ml12
1 files changed, 5 insertions, 7 deletions
diff --git a/doc/plugin_tutorial/tuto1/src/simple_declare.ml b/doc/plugin_tutorial/tuto1/src/simple_declare.ml
index eb8161c2bb..68ae5628db 100644
--- a/doc/plugin_tutorial/tuto1/src/simple_declare.ml
+++ b/doc/plugin_tutorial/tuto1/src/simple_declare.ml
@@ -1,14 +1,12 @@
-let edeclare ?hook ident (_, poly, _ as k) ~opaque sigma udecl body tyopt imps =
+let edeclare ?hook ~name ~poly ~scope ~kind ~opaque sigma udecl body tyopt imps =
let sigma, ce = DeclareDef.prepare_definition ~allow_evars:false
~opaque ~poly sigma udecl ~types:tyopt ~body in
let uctx = Evd.evar_universe_context sigma in
let ubinders = Evd.universe_binders sigma in
let hook_data = Option.map (fun hook -> hook, uctx, []) hook in
- DeclareDef.declare_definition ident k ce ubinders imps ?hook_data
+ DeclareDef.declare_definition ~name ~scope ~kind ubinders ce imps ?hook_data
-let declare_definition ~poly ident sigma body =
- let k = Decl_kinds.(Global ImportDefaultBehavior, poly, Definition) in
+let declare_definition ~poly name sigma body =
let udecl = UState.default_univ_decl in
- edeclare ident k ~opaque:false sigma udecl body None []
-
-(* But this definition cannot be undone by Reset ident *)
+ edeclare ~name ~poly ~scope:(DeclareDef.Global Declare.ImportDefaultBehavior)
+ ~kind:Decl_kinds.Definition ~opaque:false sigma udecl body None []