diff options
| author | filliatr | 1999-08-26 09:58:19 +0000 |
|---|---|---|
| committer | filliatr | 1999-08-26 09:58:19 +0000 |
| commit | d410804226ddeb15ab05af5298502ef29efbd0d8 (patch) | |
| tree | 98ad9f8c69d3d1ead1547e173fd071a23bf2deb3 /kernel/reduction.ml | |
| parent | ab00c680d097bb067f135b0ab149b224db0787a7 (diff) | |
- abstraction
- univers fonctionnels
- erreurs de typage maintenant sous forme d'exception,
déclarées dans Type_errors
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@24 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/reduction.ml')
| -rw-r--r-- | kernel/reduction.ml | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/reduction.ml b/kernel/reduction.ml index f1eb159981..c2309f8eda 100644 --- a/kernel/reduction.ml +++ b/kernel/reduction.ml @@ -169,11 +169,8 @@ let subst_term_occ locs c t = else let except = List.for_all (fun n -> n<0) locs in let (nbocc,t') = substcheck except 1 1 c t in - if List.exists (fun o -> o>=nbocc or o<= -nbocc) locs then - errorlabstrm "subst_occ" - [< 'sTR "Only "; 'iNT (nbocc-1); 'sTR " occurrences of"; - 'bRK(1,1); Printer.pr_term c; 'sPC; - 'sTR "in"; 'bRK(1,1); Printer.pr_term t>] + if List.exists (fun o -> o >= nbocc or o <= -nbocc) locs then + failwith "subst_term_occ: too few occurences" else t' @@ -752,9 +749,7 @@ type 'a conversion_function = (* Conversion utility functions *) let convert_of_constraint f u = - match f u with - | Consistent u' -> Convertible u' - | Inconsistent -> NotConvertible + try Convertible (f u) with UniverseInconsistency -> NotConvertible type conversion_test = universes -> conversion_result |
