From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA31395 for caml-redistribution; Sun, 14 Feb 1999 19:22:38 +0100 (MET) 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 VAA10048 for ; Fri, 12 Feb 1999 21:54:15 +0100 (MET) Received: from math.mit.edu (MATH.MIT.EDU [18.87.0.8]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id VAA09112 for ; Fri, 12 Feb 1999 21:54:12 +0100 (MET) Received: from severi (SEVERI.MIT.EDU [18.87.0.68]) by math.mit.edu (8.8.7/8.8.7) with ESMTP id PAA19997 for ; Fri, 12 Feb 1999 15:53:57 -0500 (EST) Date: Fri, 12 Feb 1999 15:53:57 -0500 (EST) From: Christopher Jeris X-Sender: cjeris@severi.mit.edu To: caml-list@inria.fr Subject: anonymous record types in variants Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis (Sorry only in English.) The argument of a variant type constructor cannot be an anonymous record type, i.e.: type foo = One of {one: int} | Two of {two: string} is rejected at the first {. Of course this is easy to work around, just give the record types names: type foo_one = {one: int} type foo_two = {two: string} type foo = One of foo_one | Two of foo_two But, just out of curiosity, is there a quick explanation of why it is this way? thanks & peace, Chris Jeris MIT math grad student and novice OCaml music programmer