aboutsummaryrefslogtreecommitdiff
path: root/kernel/section.mli
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-12-09 15:17:29 +0100
committerPierre-Marie Pédrot2019-12-09 15:17:29 +0100
commite176cec9cd3c9264919c8f2e773b608ec3ef2d07 (patch)
treeb1d40cbd6ee8fe2885f8af8eb44d87b0a6294ac2 /kernel/section.mli
parentd7f493c25a3b1135a4b5b50d85b1d1b4b5ab1b21 (diff)
parent88dfc41e23964cb452092deaa67d2ff975ee2b65 (diff)
Merge PR #10829: Section.t is never empty
Ack-by: ejgallego Reviewed-by: ppedrot
Diffstat (limited to 'kernel/section.mli')
-rw-r--r--kernel/section.mli11
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/section.mli b/kernel/section.mli
index ec863b3b90..fbd3d8254e 100644
--- a/kernel/section.mli
+++ b/kernel/section.mli
@@ -16,13 +16,8 @@ open Univ
type 'a t
(** Type of sections with additional data ['a] *)
-val empty : 'a t
-
-val is_empty : 'a t -> bool
-(** Checks whether there is no opened section *)
-
val depth : 'a t -> int
-(** Number of nested sections (0 if no sections are open) *)
+(** Number of nested sections. *)
(** {6 Manipulating sections} *)
@@ -30,13 +25,13 @@ type section_entry =
| SecDefinition of Constant.t
| SecInductive of MutInd.t
-val open_section : custom:'a -> 'a t -> 'a t
+val open_section : custom:'a -> 'a t option -> 'a t
(** Open a new section with the provided universe polymorphic status. Sections
can be nested, with the proviso that polymorphic sections cannot appear
inside a monomorphic one. A custom data can be attached to this section,
that will be returned by {!close_section}. *)
-val close_section : 'a t -> 'a t * section_entry list * ContextSet.t * 'a
+val close_section : 'a t -> 'a t option * section_entry list * ContextSet.t * 'a
(** Close the current section and returns the entries defined inside, the set
of global monomorphic constraints added in this section, and the custom data
provided at the opening of the section. *)