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 VAA11097 for caml-redistribution; Sun, 22 Aug 1999 21:14:44 +0200 (MET DST) 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 JAA22605 for ; Mon, 16 Aug 1999 09:57:41 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id JAA26005; Mon, 16 Aug 1999 09:57:35 +0200 (MET DST) Received: from localhost (safran.kurims.kyoto-u.ac.jp [130.54.16.91]) by kurims.kurims.kyoto-u.ac.jp (8.9.1a/3.7W) with ESMTP id QAA11065; Mon, 16 Aug 1999 16:57:29 +0900 (JST) To: Francois.Pottier@inria.fr Cc: caml-list@inria.fr Subject: Re: More confusion with mutually recursive type definitions In-Reply-To: Your message of "Mon, 16 Aug 1999 09:51:18 +0200" <19990816095118.02091@pauillac.inria.fr> References: <19990816095118.02091@pauillac.inria.fr> X-Mailer: Mew version 1.93 on Emacs 20.4 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19990816165749X.garrigue@kurims.kyoto-u.ac.jp> Date: Mon, 16 Aug 1999 16:57:49 +0900 From: Jacques GARRIGUE X-Dispatcher: imput version 980905(IM100) Content-Transfer-Encoding: 7bit Sender: weis > 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... And ought to be... this is a bug: Objective Caml version 2.02 # type 'a t = 'a constraint 'a = int and u = A of int t and v = B of bool t;; Uncaught exception: Ctype.Unify(_) Is it already corrected ? Jacques --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG