Browse thread
[Caml-list] Sumtypes of records
[
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: | Christophe Poucet <christophe.poucet@p...> |
| Subject: | [Caml-list] Sumtypes of records |
Why can't constructors of sumtypes take nameless records? (Warning stupid example follows)
type plop = Foo | Bar {age : int};;
doesn't work, but
type person = {age : int};;
type plop = Foo | Bar of person;;
does.
Anyone know why?
Thanking you in advance,