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 RAA05007; Sat, 12 May 2001 17:28:08 +0200 (MET DST) 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 RAA05003 for ; Sat, 12 May 2001 17:28:07 +0200 (MET DST) Received: from www.invert.com (invert.com [209.164.21.15]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f4CFS6b23772 for ; Sat, 12 May 2001 17:28:06 +0200 (MET DST) Received: (from miles@localhost) by www.invert.com (8.10.1/8.10.1AA) id f4CFS5J56475 for caml-list@inria.fr; Sat, 12 May 2001 08:28:05 -0700 (PDT) (envelope-from miles) Date: Sat, 12 May 2001 08:28:05 -0700 From: Miles Egan To: caml-list@inria.fr Subject: Re: [Caml-list] recursive variants Message-ID: <20010512082805.B50306@caddr.com> References: <20010511225250.A50306@caddr.com> <3AFCFB23.CB503721@tsc.uc3m.es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3AFCFB23.CB503721@tsc.uc3m.es>; from fva@tsc.uc3m.es on Sat, May 12, 2001 at 10:58:11AM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, May 12, 2001 at 10:58:11AM +0200, Francisco Valverde Albacete wrote: > You don't need a recursive type for this: > > type word = Word of string > type word_list = word list > type phrase = unit -> word list > type phrase_list = phrase list I tried this also, but I couldn't figure out how to type the list that contains both (phrase_list * phrase_list) and (phrase_list * word_list) without grouping them in a single common type. The compiler still rejects the grammar list because its elements are not homogenous. -- miles ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr