From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA02145 for caml-redistribution; Fri, 30 May 1997 14:20:37 +0200 (MET DST) 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 OAA02068 for ; Fri, 30 May 1997 14:17:24 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.12]) by concorde.inria.fr (8.8.5/8.7.3) with ESMTP id OAA14928 for ; Fri, 30 May 1997 14:17:23 +0200 (MET DST) Received: from vedette.ens.fr (vedette.ens.fr [129.199.130.1]) by nef.ens.fr (8.8.5/jtpda-5.1) with ESMTP id OAA15358 ; Fri, 30 May 1997 14:17:18 +0200 (MET DST) Received: from localhost (vouillon@localhost) by vedette.ens.fr (8.8.5/jb-1.1) id OAA14324 ; Fri, 30 May 1997 14:17:17 +0200 (MET DST) X-Authentication-Warning: vedette.ens.fr: vouillon owned process doing -bs Date: Fri, 30 May 1997 14:17:17 +0200 (MET DST) From: Jerome Vouillon X-Sender: vouillon@vedette Reply-To: Jerome Vouillon To: Ernesto Posse cc: Caml List Subject: Re: Type constraints In-Reply-To: <338DD17B.62C6@impsat.net.co> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis On Thu, 29 May 1997, Ernesto Posse wrote: > type 'a node = {x: 'a; y: t1} > and t1 = A | B of t1*t1 > and t2 = C | D of (string * t2) node | E of bool node > > I obtain this message: > > Characters 98-102: > This type parameter bool should be an instance of type string * t2 In the current release, in mutually recursive type definitions, all occurrences of a type being defined (here, for instance, 'a node) must have the same parameters. This overly restrictive constraint will be removed in the next release. In the meantime, as Didier Rousseau noticed, you can move the definition of type t2 out of the recursive type definition: type 'a node = {x: 'a; y: t1} and t1 = A | B of t1*t1 type t2 = C | D of (string * t2) node | E of bool node -- Jerome Vouillon