diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2005-12-17 22:03:35 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2005-12-17 22:03:35 +0000 |
commit | 1bec6b33c62e6b465753ebc17630ea3db433feb1 (patch) | |
tree | 2167c489fd0d9e27e37ef33d8f4d7a3fe0366a76 | |
parent | ae6c95a3755fc3a9434bcc9fdd81b7c69baa8280 (diff) |
Création d'un type d'erreur RecursionSchemeError distinct de InductiveError (suite)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7662 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | pretyping/indrec.ml | 11 | ||||
-rw-r--r-- | toplevel/cerrors.ml | 1 | ||||
-rw-r--r-- | toplevel/himsg.ml | 1 | ||||
-rw-r--r-- | toplevel/himsg.mli | 1 |
4 files changed, 8 insertions, 6 deletions
diff --git a/pretyping/indrec.ml b/pretyping/indrec.ml index b0dcdde0d..ef6fccfc4 100644 --- a/pretyping/indrec.ml +++ b/pretyping/indrec.ml @@ -56,7 +56,7 @@ let mis_make_case_com depopt env sigma (ind,mib,mip) kind = in if not (List.exists ((=) kind) mip.mind_kelim) then raise - (InductiveError + (RecursionSchemeError (NotAllowedCaseAnalysis (dep,(new_sort_in_family kind),ind))); @@ -505,11 +505,10 @@ let check_arities listdepkind = (fun ln ((_,ni),mibi,mipi,dep,kind) -> let id = mipi.mind_typename in let kelim = mipi.mind_kelim in - if not (List.exists ((=) kind) kelim) then - raise - (InductiveError (BadInduction (dep, id, new_sort_in_family kind))) + if not (List.exists ((=) kind) kelim) then raise + (RecursionSchemeError (BadInduction (dep,id,new_sort_in_family kind))) else if List.mem ni ln then raise - (InductiveError NotMutualInScheme) + (RecursionSchemeError NotMutualInScheme) else ni::ln) [] listdepkind in true @@ -526,7 +525,7 @@ let build_mutual_indrec env sigma = function let (mibi',mipi') = lookup_mind_specif env mind' in (mind',mibi',mipi',dep',s') else - raise (InductiveError NotMutualInScheme)) + raise (RecursionSchemeError NotMutualInScheme)) lrecspec) in let _ = check_arities listdepkind in diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml index 8a4487727..d2d180a6a 100644 --- a/toplevel/cerrors.ml +++ b/toplevel/cerrors.ml @@ -14,6 +14,7 @@ open Ast open Indtypes open Type_errors open Pretype_errors +open Indrec open Lexer let print_loc loc = diff --git a/toplevel/himsg.ml b/toplevel/himsg.ml index 40fae1e8f..73924685f 100644 --- a/toplevel/himsg.ml +++ b/toplevel/himsg.ml @@ -21,6 +21,7 @@ open Sign open Environ open Pretype_errors open Type_errors +open Indrec open Reduction open Cases open Logic diff --git a/toplevel/himsg.mli b/toplevel/himsg.mli index 2625243dc..cacdf9b0c 100644 --- a/toplevel/himsg.mli +++ b/toplevel/himsg.mli @@ -15,6 +15,7 @@ open Indtypes open Environ open Type_errors open Pretype_errors +open Indrec open Cases open Logic (*i*) |