aboutsummaryrefslogtreecommitdiff
path: root/vernac/declareDef.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-03-07 01:04:46 -0500
committerEmilio Jesus Gallego Arias2020-03-25 06:02:07 -0400
commit4f81cc44e5af01f40ad972a7285edd2c40c178c7 (patch)
treed8680af1f1eb5adfeada874613a1c5fc61c31073 /vernac/declareDef.ml
parentbc70bb31c579b9482d0189f20806632c62b26a61 (diff)
[proof] Start of mutual definition save refactoring.
First commit of a series that will unify (and enforce) the handling of mutual constants. We will split this in several commits as to easy debugging / bisect in case of problems. In this first commit, we move the actual declare logic to a common place.
Diffstat (limited to 'vernac/declareDef.ml')
-rw-r--r--vernac/declareDef.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/vernac/declareDef.ml b/vernac/declareDef.ml
index 09582f4ef2..edf7ed9dc3 100644
--- a/vernac/declareDef.ml
+++ b/vernac/declareDef.ml
@@ -69,6 +69,13 @@ let declare_definition ~name ~scope ~kind ?hook_data ~ubind ~impargs ce =
end;
dref
+let declare_mutually_recursive ~opaque ~univs ~scope ~kind ~ubind fixnames fixdecls fixtypes fiximps =
+ CList.map4
+ (fun name body types impargs ->
+ let ce = Declare.definition_entry ~opaque ~types ~univs body in
+ declare_definition ~name ~scope ~kind ~ubind ~impargs ce)
+ fixnames fixdecls fixtypes fiximps
+
let warn_let_as_axiom =
CWarnings.create ~name:"let-as-axiom" ~category:"vernacular"
Pp.(fun id -> strbrk "Let definition" ++ spc () ++ Names.Id.print id ++