summaryrefslogtreecommitdiff
path: root/kernel/mod_typing.ml
diff options
context:
space:
mode:
authorGravatar Samuel Mimram <smimram@debian.org>2007-02-13 13:48:12 +0000
committerGravatar Samuel Mimram <smimram@debian.org>2007-02-13 13:48:12 +0000
commit55ce117e8083477593cf1ff2e51a3641c7973830 (patch)
treea82defb4105f175c71b0d13cae42831ce608c4d6 /kernel/mod_typing.ml
parent208a0f7bfa5249f9795e6e225f309cbe715c0fad (diff)
Imported Upstream version 8.1+dfsgupstream/8.1+dfsg
Diffstat (limited to 'kernel/mod_typing.ml')
-rw-r--r--kernel/mod_typing.ml15
1 files changed, 5 insertions, 10 deletions
diff --git a/kernel/mod_typing.ml b/kernel/mod_typing.ml
index 663434ec..352a1e46 100644
--- a/kernel/mod_typing.ml
+++ b/kernel/mod_typing.ml
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(*i $Id: mod_typing.ml 9310 2006-10-28 19:35:09Z herbelin $ i*)
+(*i $Id: mod_typing.ml 9558 2007-01-30 14:58:42Z soubiran $ i*)
open Util
open Names
@@ -123,7 +123,7 @@ and merge_with env mtb with_decl =
let _ = subst_modtype (map_msid msid (MPself msid)) mtb in
()
with
- Failure _ -> error_circular_with_module id
+ Circularity _ -> error_circular_with_module id
end;
let cst =
try check_subtypes env' mtb old.msb_modtype
@@ -247,10 +247,8 @@ and translate_module env is_definition me =
| None -> mtb1, None, Constraint.empty
| Some mte ->
let mtb2 = translate_modtype env mte in
- let cst =
- try check_subtypes env mtb1 mtb2
- with Failure _ -> error "not subtype" in
- mtb2, Some mtb2, cst
+ let cst = check_subtypes env mtb1 mtb2 in
+ mtb2, Some mtb2, cst
in
{ mod_type = mtb;
mod_user_type = mod_user_type;
@@ -274,10 +272,7 @@ and translate_mexpr env mexpr = match mexpr with
let ftb = scrape_modtype env ftb in
let farg_id, farg_b, fbody_b = destr_functor ftb in
let meb,mtb = translate_mexpr env mexpr in
- let cst =
- try check_subtypes env mtb farg_b
- with Failure _ ->
- error "" in
+ let cst = check_subtypes env mtb farg_b in
let mp =
try
path_of_mexpr mexpr