aboutsummaryrefslogtreecommitdiff
path: root/kernel/reduction.ml
diff options
context:
space:
mode:
authorfilliatr1999-08-26 09:58:19 +0000
committerfilliatr1999-08-26 09:58:19 +0000
commitd410804226ddeb15ab05af5298502ef29efbd0d8 (patch)
tree98ad9f8c69d3d1ead1547e173fd071a23bf2deb3 /kernel/reduction.ml
parentab00c680d097bb067f135b0ab149b224db0787a7 (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.ml11
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