Browse thread
Re: [Caml-list] Polymorphic variant difference...
-
David Allsopp
-
Jacques Garrigue
-
David Allsopp
- Frédéric_van_der_Plancke
-
David Allsopp
-
Jacques Garrigue
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Frédéric_van_der_Plancke <fvdp@d...> |
| Subject: | Re: [Caml-list] Polymorphic variant difference... |
David Allsopp wrote: > ** Furthermore, I can't even hide these redundant types in the > implementation: > > Foo.mli > > type t = [ `A | `B ] > > Foo.ml > > type t' = [ `A ] > type t = [ `A | t' ] > > Is not valid even though t is /effectively/ the same p-variant in both the > .mli and .ml > That's maybe just because of a typo (you wrote `A for `B below) ? This seems to works with 3.09: # module M : sig type t = [ `A | `B ] end = struct type t' = [`A] type t = [`B | t' ] end;; module M : sig type t = [ `A | `B ] end Frédéric