From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id RAA24550 for caml-redistribution; Thu, 12 Sep 1996 17:06:04 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id NAA20904 for ; Thu, 12 Sep 1996 13:56:48 +0200 Received: from nef.ens.fr (nef.ens.fr [129.199.96.12]) by concorde.inria.fr (8.7.1/8.7.1) with SMTP id NAA23016 for ; Thu, 12 Sep 1996 13:56:47 +0200 (MET DST) Received: from vedette.ens.fr by nef.ens.fr (5.65c8/ULM-1.0) Id AA19272 ; Thu, 12 Sep 1996 13:56:45 +0200 Date: Thu, 12 Sep 1996 13:56:44 +0200 (MET DST) From: Jerome Vouillon Sender: weis Reply-To: Jerome Vouillon Subject: Re: As-binding #-types To: Frank Christoph Cc: caml-list@pauillac.inria.fr In-Reply-To: <9609120953.AA00876@sparc3.nextsolution.co.jp> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII > #type 'a mytype = Mk of #myclass as 'a;; > Unbound row variable in #myclass In a type definition, type parameters *must* be free variables. But, here, you try to bind the type parameter 'a to #myclass. So, this definition fails. Actually, the compiler sees that #myclass contains a row variable that obviously cannot be a type parameter, and hence rejects this phrase. You can remove the constraint and just write #type 'a mytype = Mk of 'a;; I don't think omitting the type constraint is a problem in practice. However, I plan to add constrained type definitions to the language in the future. Then you will probably be able to write your type definition as #type (#myclass as 'a) mytype = Mk of 'a;; Jerome