caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Sumtypes of records
@ 2003-05-09 16:08 Christophe Poucet
  2003-05-09 17:12 ` Ville-Pertti Keinonen
  0 siblings, 1 reply; 9+ messages in thread
From: Christophe Poucet @ 2003-05-09 16:08 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

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,


[-- Attachment #2: Type: text/html, Size: 1161 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-06-02 21:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-09 16:08 [Caml-list] Sumtypes of records Christophe Poucet
2003-05-09 17:12 ` Ville-Pertti Keinonen
2003-05-17  1:35   ` Chris Hecker
2003-05-17  8:13     ` Ville-Pertti Keinonen
2003-05-17  8:24       ` Ville-Pertti Keinonen
2003-05-17 13:26     ` Marcin 'Qrczak' Kowalczyk
2003-05-18  6:33       ` Chris Hecker
2003-05-18  7:46         ` Marcin 'Qrczak' Kowalczyk
2003-06-02 21:29           ` John Max Skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).