From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA25219; Fri, 9 May 2003 18:08:15 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA25519 for ; Fri, 9 May 2003 18:08:14 +0200 (MET DST) Received: from eos.telenet-ops.be (eos.telenet-ops.be [195.130.132.40]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h49G8DH29600 for ; Fri, 9 May 2003 18:08:13 +0200 (MET DST) Received: from localhost (localhost.localdomain [127.0.0.1]) by eos.telenet-ops.be (Postfix) with SMTP id 8E3A31FF43 for ; Fri, 9 May 2003 18:08:13 +0200 (CEST) Received: from j (D5760EE5.kabel.telenet.be [213.118.14.229]) by eos.telenet-ops.be (Postfix) with SMTP id 6AF6A1FF33 for ; Fri, 9 May 2003 18:08:13 +0200 (CEST) Message-ID: <003e01c31645$2bfa3c00$e50e76d5@j> From: "Christophe Poucet" To: Subject: [Caml-list] Sumtypes of records Date: Fri, 9 May 2003 18:08:04 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003B_01C31655.EF6AA200" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam: no; 0.00; stupid:01 plop:01 foo:01 W28:99 christophe:01 int:01 constructors:01 age:96 arial:95 type:07 message:89 U4:88 doesn't:12 can't:15 bar:15 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_003B_01C31655.EF6AA200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Why can't constructors of sumtypes take nameless records? (Warning = stupid example follows) type plop =3D Foo | Bar {age : int};; doesn't work, but =20 type person =3D {age : int};; type plop =3D Foo | Bar of person;; does. Anyone know why? Thanking you in advance, ------=_NextPart_000_003B_01C31655.EF6AA200 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Why can't constructors of sumtypes take = nameless=20 records? (Warning stupid example follows)
 
type plop =3D Foo | Bar {age :=20 int};;
 
doesn't work, but          &= nbsp;           &n= bsp;     

type person =3D {age : int};;
type plop =3D Foo | Bar of person;;
 
does.
 
Anyone know why?
 
Thanking you in advance,
 
------=_NextPart_000_003B_01C31655.EF6AA200-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners