From 9c678306157b2c6199091709ef7bb067f724f80c Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Mon, 19 Nov 2018 18:18:26 +0100 Subject: Refactor typechecking of inductive types We split into smaller functions, use more specific types for universe manipulation, and try to limit how much of the big tuple gets passed to subroutines. --- kernel/indtypes.mli | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'kernel/indtypes.mli') diff --git a/kernel/indtypes.mli b/kernel/indtypes.mli index 5e37df6976..7810c1723e 100644 --- a/kernel/indtypes.mli +++ b/kernel/indtypes.mli @@ -14,19 +14,7 @@ open Declarations open Environ open Entries -(** Inductive type checking and errors *) - -val check_positivity : chkpos:bool -> - Names.MutInd.t -> - Environ.env -> - (Constr.constr, Constr.types) Context.Rel.pt -> - Declarations.recursivity_kind -> - ('a * Names.Id.t list * Constr.types array * - (('b, 'c) Context.Rel.pt * 'd)) - array -> Int.t * Declarations.recarg Rtree.t array - -(** The following function does checks on inductive declarations. *) - +(** Check an inductive. *) val check_inductive : env -> MutInd.t -> mutual_inductive_entry -> mutual_inductive_body (** Deprecated *) @@ -41,6 +29,7 @@ type inductive_error = | NotAnArity of env * constr | BadEntry | LargeNonPropInductiveNotInType + | BadUnivs [@@ocaml.deprecated "Use [Type_errors.inductive_error]"] exception InductiveError of Type_errors.inductive_error -- cgit v1.2.3