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 RAA05198; Sat, 12 May 2001 17:34:00 +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 RAA05193 for ; Sat, 12 May 2001 17:33:59 +0200 (MET DST) Received: from dpt-info.u-strasbg.fr (dpt-info.u-strasbg.fr [130.79.6.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f4CFXwb06195 for ; Sat, 12 May 2001 17:33:58 +0200 (MET DST) Received: from lambda.u-strasbg.fr (mail@lambda.u-strasbg.fr [130.79.90.63]) by dpt-info.u-strasbg.fr (8.9.3/8.9.3) with ESMTP id RAA26016; Sat, 12 May 2001 17:34:08 +0200 Received: from luther by lambda.u-strasbg.fr with local (Exim 3.22 #1 (Debian)) id 14ybQv-0007GS-00; Sat, 12 May 2001 17:35:53 +0200 Date: Sat, 12 May 2001 17:35:53 +0200 To: Miles Egan Cc: caml-list@inria.fr Subject: Re: [Caml-list] recursive variants Message-ID: <20010512173553.A27913@lambda.u-strasbg.fr> References: <20010511225250.A50306@caddr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.17i In-Reply-To: <20010511225250.A50306@caddr.com>; from miles@caddr.com on Fri, May 11, 2001 at 10:52:51PM -0700 From: Sven LUTHER Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, May 11, 2001 at 10:52:51PM -0700, Miles Egan wrote: > type grammar_element = > Word of string > | Wordlist of Word list > | Phrase of unit -> Wordlist > | Phraselist of Phrase list Err, Phrase and such are not types, but values, you could do somethign like : type a = | Word of string | Wordlist of a list | Phrase of (unit ->a) | Phraselist of a list or more probably : type word = string type wordlist = string list type phrase = unit -> wordlist type phraselist = phrase list and then : type grammar_element = | Word of word | Wordlist of wordlist | Phrase of phrase | Phraselist of phraselist or something such. beware, non of this is tested, but you should be able to find somethign working along those lines. Hope this helps, ... Friendly, Sven Luther ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr