From 3ec3c28ef7cab6ea7efc9552be585d48583c51cb Mon Sep 17 00:00:00 2001 From: barras Date: Wed, 16 Jan 2002 14:39:14 +0000 Subject: correction de bug avec les mutuels imbriques a plusieurs niveaux git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2401 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/indtypes.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'kernel/indtypes.ml') diff --git a/kernel/indtypes.ml b/kernel/indtypes.ml index a5224914ba..6ea71e09a5 100644 --- a/kernel/indtypes.ml +++ b/kernel/indtypes.ml @@ -337,8 +337,11 @@ let listrec_mconstr env ntypes hyps nparams i indlc = else raise (IllFormedInd (LocalNonPos n)) | Ind ind_sp -> - if List.for_all (noccur_between n ntypes) largs - then Norec + (* If the inductive type being defined or a parameter appears as + parameter, then we have an imbricated type *) + if List.for_all (noccur_between n ntypes) largs && + List.for_all (noccur_between (n-nhyps) nhyps) largs + then Norec else Imbr(ind_sp,imbr_positive env n ind_sp largs) | err -> if noccur_between n ntypes x && -- cgit v1.2.3