diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2007-10-18 03:38:28 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2007-10-18 03:38:28 +0000 |
commit | 8c5ed4dd1f1d19e33eeb77a572bcf0e324e7d6f2 (patch) | |
tree | 4e988d4d1bf396c0f7db4983973f6c9d58ec02b3 | |
parent | a9cc579207816aab97970fed9a22aeaf68149c02 (diff) |
corrige rangees privees apres introduction abbreviations privees par PW
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8435 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | typing/env.ml | 3 | ||||
-rw-r--r-- | typing/mtype.ml | 4 | ||||
-rw-r--r-- | typing/printtyp.ml | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/typing/env.ml b/typing/env.ml index 1a80da9e5..bfa73e7d5 100644 --- a/typing/env.ml +++ b/typing/env.ml @@ -262,7 +262,8 @@ and find_cltype = let find_type_expansion path env = let decl = find_type path env in match decl.type_manifest with - | Some body when decl.type_private = Public -> (decl.type_params, body) + | Some body when decl.type_private = Public || Btype.has_constr_row body -> + (decl.type_params, body) | _ -> raise Not_found let find_modtype_expansion path env = diff --git a/typing/mtype.ml b/typing/mtype.ml index ac5e2424a..bbf43179d 100644 --- a/typing/mtype.ml +++ b/typing/mtype.ml @@ -50,7 +50,9 @@ and strengthen_sig env sg p = match decl.type_manifest with Some ty when not (Btype.has_constr_row ty) -> decl | _ -> - { decl with type_manifest = + { decl with + type_private = Asttypes.Public; + type_manifest = Some(Btype.newgenty(Tconstr(Pdot(p, Ident.name id, nopos), decl.type_params, ref Mnil))) } in diff --git a/typing/printtyp.ml b/typing/printtyp.ml index 242765e34..c6aec4fc8 100644 --- a/typing/printtyp.ml +++ b/typing/printtyp.ml @@ -564,8 +564,7 @@ let rec tree_of_type_decl id decl = begin match ty_manifest with | None -> (Otyp_abstract, Public) | Some ty -> - tree_of_typexp false ty, - (if has_constr_row ty then Private else decl.type_private) + tree_of_typexp false ty, decl.type_private end | Type_variant cstrs -> tree_of_manifest (Otyp_sum (List.map tree_of_constructor cstrs)), |