summaryrefslogtreecommitdiff
path: root/kernel/indtypes.ml
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2009-02-01 00:54:40 +0100
committerGravatar Stephane Glondu <steph@glondu.net>2009-02-01 00:54:40 +0100
commitcfbfe13f5b515ae2e3c6cdd97e2ccee03bc26e56 (patch)
treeb7832bd5d412a5a5d69cb36ae2ded62c71124c22 /kernel/indtypes.ml
parent113b703a695acbe31ac6dd6a8c4aa94f6fda7545 (diff)
Imported Upstream version 8.2~rc2+dfsgupstream/8.2.rc2+dfsg
Diffstat (limited to 'kernel/indtypes.ml')
-rw-r--r--kernel/indtypes.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/indtypes.ml b/kernel/indtypes.ml
index 01b8aca1..06764834 100644
--- a/kernel/indtypes.ml
+++ b/kernel/indtypes.ml
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(* $Id: indtypes.ml 11309 2008-08-06 10:30:35Z herbelin $ *)
+(* $Id: indtypes.ml 11784 2009-01-14 11:36:32Z herbelin $ *)
open Util
open Names
@@ -46,6 +46,7 @@ type inductive_error =
| SameNamesOverlap of identifier list
| NotAnArity of identifier
| BadEntry
+ | LargeNonPropInductiveNotInType
exception InductiveError of inductive_error
@@ -266,7 +267,7 @@ let typecheck_inductive env mie =
| Prop Pos when engagement env <> Some ImpredicativeSet ->
(* Predicative set: check that the content is indeed predicative *)
if not (is_type0m_univ lev) & not (is_type0_univ lev) then
- error "Large non-propositional inductive types must be in Type.";
+ raise (InductiveError LargeNonPropInductiveNotInType);
Inl (info,full_arity,s), cst
| Prop _ ->
Inl (info,full_arity,s), cst in