Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Sumtypes of records
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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,