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 QAA19087 for caml-redistribution; Tue, 16 Feb 1999 16:16:28 +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 LAA09251 for ; Tue, 16 Feb 1999 11:57:07 +0100 (MET) Received: from post.tepkom.ru (relay.tepkom.ru [195.9.240.162]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id LAA00760 for ; Tue, 16 Feb 1999 11:57:03 +0100 (MET) Received: from localhost (msk@localhost) by post.tepkom.ru (8.8.7/8.8.7) with ESMTP id NAA22824; Tue, 16 Feb 1999 13:57:08 +0300 Date: Tue, 16 Feb 1999 13:57:08 +0300 (MSK) From: Anton Moscal To: Christopher Jeris cc: caml-list@inria.fr Subject: Re: anonymous record types in variants In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis On Fri, 12 Feb 1999, Christopher Jeris wrote: > 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} > I agree. I often need the following usage of anonymous types: type text = int(*length*) * (File of string | Str of string | ...) (factorizing of the common fields in the variant types). SML allow this construction. Probably an optimal solution would be to allow anonymous types in any context. Regards, Anton Moscal