summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-05-22 11:58:12 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-05-22 11:58:12 +0000
commit6b4c07d3232b86732397c0cf5c607b64cbd9c623 (patch)
tree2570090ab6f593e363d2f76e3bd760d8e1a612f3
parente08124cf32a059ec9eeaaae93c5ee8b1af0c5888 (diff)
Correction bug dans nondep_supertype.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--typing/mtype.ml14
1 files changed, 7 insertions, 7 deletions
diff --git a/typing/mtype.ml b/typing/mtype.ml
index 96d364fd9..e68a3ff00 100644
--- a/typing/mtype.ml
+++ b/typing/mtype.ml
@@ -58,12 +58,12 @@ and strengthen_sig env sg p =
type variance = Co | Contra | Strict
-let nondep_supertype env id mty =
+let nondep_supertype env mid mty =
let rec nondep_mty var mty =
match mty with
Tmty_ident p ->
- if Path.isfree id p then begin
+ if Path.isfree mid p then begin
match Env.find_modtype p env with
Tmodtype_abstract -> raise Not_found
| Tmodtype_manifest mty -> nondep_mty var mty
@@ -82,7 +82,7 @@ let nondep_supertype env id mty =
match item with
Tsig_value(id, d) ->
begin try
- Tsig_value(id, {val_type = Ctype.nondep_type env id d.val_type;
+ Tsig_value(id, {val_type = Ctype.nondep_type env mid d.val_type;
val_prim = d.val_prim}) :: rem'
with Not_found ->
match var with Co -> rem' | _ -> raise Not_found
@@ -97,7 +97,7 @@ let nondep_supertype env id mty =
end
| Tsig_exception(id, d) ->
begin try
- Tsig_exception(id, List.map (Ctype.nondep_type env id) d) :: rem'
+ Tsig_exception(id, List.map (Ctype.nondep_type env mid) d) :: rem'
with Not_found ->
match var with Co -> rem' | _ -> raise Not_found
end
@@ -124,14 +124,14 @@ let nondep_supertype env id mty =
Type_abstract ->
Type_abstract
| Type_manifest ty ->
- Type_manifest(Ctype.nondep_type env id ty)
+ Type_manifest(Ctype.nondep_type env mid ty)
| Type_variant cstrs ->
Type_variant(List.map
- (fun (c, tl) -> (c, List.map (Ctype.nondep_type env id) tl))
+ (fun (c, tl) -> (c, List.map (Ctype.nondep_type env mid) tl))
cstrs)
| Type_record lbls ->
Type_record(List.map
- (fun (c, mut, t) -> (c, mut, Ctype.nondep_type env id t))
+ (fun (c, mut, t) -> (c, mut, Ctype.nondep_type env mid t))
lbls)}
and abstract_type_decl d =