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 NAA13977; Fri, 16 Jan 2004 13:07:46 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA13965 for ; Fri, 16 Jan 2004 13:07:45 +0100 (MET) Received: from alex.baretta.com ([213.255.109.130]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id i0GC7j504840 for ; Fri, 16 Jan 2004 13:07:45 +0100 (MET) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by alex.baretta.com (8.12.8/8.12.8) with ESMTP id i0GC7sa9003248 for ; Fri, 16 Jan 2004 13:07:54 +0100 Message-ID: <4007D41A.4020800@baretta.com> Date: Fri, 16 Jan 2004 13:07:54 +0100 From: Alex Baretta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ocaml Subject: Re: [Caml-list] Stupid question References: <20040116094357V.garrigue@kurims.kyoto-u.ac.jp> <16391.41836.251525.54048@ithif51.inf.tu-dresden.de> <4007BC36.3600A6DA@decis.be> In-Reply-To: <4007BC36.3600A6DA@decis.be> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; baretta:01 baretta:01 caml-list:01 stupid:01 plancke:01 hendrik:01 tews:01 type-check:01 fuz:99 foo:01 alex:01 alex:01 int:01 float:02 exception:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Frederic van der Plancke wrote: > > Hendrik Tews wrote: > >>There is a special exception: true, false, [], (), and :: are >>constructor names, see 6.3 Naming objects. One can ideed write >> >># type x = true of int | () of string | :: of float > > > But you better have a pair of types after '::' ;-) You'd also better make sure that the the type definition is right-recursive through :: , or you won't be able to type-check let fuz = foo :: bar :: buz Alex ------------------- 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