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 VAA25864 for caml-redistribution; Sun, 22 Aug 1999 21:14:10 +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 JAA19480 for ; Mon, 16 Aug 1999 09:51:52 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id JAA18897; Mon, 16 Aug 1999 09:51:24 +0200 (MET DST) Received: (from fpottier@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA21932; Mon, 16 Aug 1999 09:51:18 +0200 (MET DST) Message-ID: <19990816095118.02091@pauillac.inria.fr> Date: Mon, 16 Aug 1999 09:51:18 +0200 From: Francois Pottier To: Jacques GARRIGUE Cc: caml-list@inria.fr Subject: More confusion with mutually recursive type definitions References: <19990816083158.52649@pauillac.inria.fr> <19990816160801Q.garrigue@kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.89.1 In-Reply-To: <19990816160801Q.garrigue@kurims.kyoto-u.ac.jp>; from Jacques GARRIGUE on Mon, Aug 16, 1999 at 04:08:01PM +0900 Sender: weis > But if it is yet to be defined (which is the case with mutually > recursive definitions), you must keep everything monomorphic so that > constraints can be enforced later. OK, so I understand the following error message: # type 'a t = 'a and u = int t and v = bool t;; This type bool should be an instance of type int But then, why is the following declaration accepted? # type 'a t = 'a and u = A of int t and v = B of bool t;; type 'a t = 'a type u = | A of int t type v = | B of bool t I am still confused... -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/