| 1 | (************************************************************************) |
| 2 | (* * The Rocq Prover / The Rocq Development Team *) |
| 3 | (* v * Copyright INRIA, CNRS and contributors *) |
| 4 | (* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 | (* \VV/ **************************************************************) |
| 6 | (* // * This file is distributed under the terms of the *) |
| 7 | (* * GNU Lesser General Public License Version 2.1 *) |
| 8 | (* * (see LICENSE file for the text of the license) *) |
| 9 | (************************************************************************) |
| 10 | |
| 11 | type t |
| 12 | (** Set of flags for universe polymorphism, implicit sort polymorphism and cumulativity. |
| 13 | Note that implicit sort polymorphism (not collapsing sort variables to Type) and |
| 14 | cumulativity only make sense for constructions that are already polymorphic. |
| 15 | This invariant is ensured by the smart constructor below. |
| 16 | *) |
| 17 | |
| 18 | (** Raises a user error if [univ_poly = false] and either [collapse_sort_variables = false] or [cumulative = true]. *) |
| 19 | val make : univ_poly:bool -> collapse_sort_variables:bool -> cumulative:bool -> t |
| 20 | |
| 21 | (** The [default] is monomorphic: |
| 22 | [univ_poly] and [cumulative] are [false], [collapse_sort_variables] is [true] *) |
| 23 | val default : t |
| 24 | |
| 25 | (** Only sets the universe [univ_poly] flag. |
| 26 | Use with care, this probably indicates that the code does not handle |
| 27 | [cumulative] constructions when it should. Code relying on elaboration should |
| 28 | also support the [collapse_sort_variables] flag. *) |
| 29 | val of_univ_poly : bool -> t |
| 30 | |
| 31 | (** Accessors *) |
| 32 | val univ_poly : t -> bool |
| 33 | val collapse_sort_variables : t -> bool |
| 34 | val cumulative : t -> bool |
| 35 | |
| 36 | (** Pretty print *) |
| 37 | val pr : t -> Pp.t |
| 38 | |
| 39 | (** Used to have distinguished default behaviors when treating assumptions/axioms, |
| 40 | definitions or inductives *) |
| 41 | type construction_kind = |
| 42 | Assumption | Definition | Inductive |