summaryrefslogtreecommitdiff
path: root/typing/mtype.ml
diff options
context:
space:
mode:
Diffstat (limited to 'typing/mtype.ml')
-rw-r--r--typing/mtype.ml12
1 files changed, 7 insertions, 5 deletions
diff --git a/typing/mtype.ml b/typing/mtype.ml
index 95c995dcde..b3a7c58fc6 100644
--- a/typing/mtype.ml
+++ b/typing/mtype.ml
@@ -51,11 +51,13 @@ and strengthen_sig env sg p =
match decl.type_manifest with
Some ty when decl.type_private = Public -> decl
| _ ->
- { decl with
- type_private = Public;
- type_manifest =
- Some(Btype.newgenty(Tconstr(Pdot(p, Ident.name id, nopos),
- decl.type_params, ref Mnil))) }
+ let manif =
+ Some(Btype.newgenty(Tconstr(Pdot(p, Ident.name id, nopos),
+ decl.type_params, ref Mnil))) in
+ if decl.type_kind = Type_abstract then
+ { decl with type_private = Public; type_manifest = manif }
+ else
+ { decl with type_manifest = manif }
in
Tsig_type(id, newdecl, rs) :: strengthen_sig env rem p
| (Tsig_exception(id, d) as sigelt) :: rem ->