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 VAA25884 for caml-redistribution; Wed, 23 Jun 1999 21:53:49 +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 DAA05848 for ; Wed, 23 Jun 1999 03:40:45 +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 DAA26554 for ; Wed, 23 Jun 1999 03:40:41 +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 KAA22809; Wed, 23 Jun 1999 10:40:27 +0900 (JST) To: tews@tcs.inf.tu-dresden.de Cc: caml-list@inria.fr Subject: Re: grammar for class types, reraised In-Reply-To: Your message of "Tue, 22 Jun 1999 19:00:22 +0200" <199906221700.TAA21025@ithif20.inf.tu-dresden.de> References: <199906221700.TAA21025@ithif20.inf.tu-dresden.de> X-Mailer: Mew version 1.93 on Emacs 20.3 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19990623104049R.garrigue@kurims.kyoto-u.ac.jp> Date: Wed, 23 Jun 1999 10:40:49 +0900 From: Jacques GARRIGUE X-Dispatcher: imput version 980905(IM100) Content-Transfer-Encoding: 7bit Sender: weis From: Hendrik Tews > From: Jerome Vouillon > > 2. Why is it not possible to add type constraints to the first > > kind of type abbreviation, like in > > > > class type ['a] c = ['a, string] a constraint 'a = int;; > > There is no real reason. I think I could add this quite easily to the > language if you need this. In fact, you can already do that: class type ['a, 'b] a = object method m : 'a -> 'b end class type ['a] c = object inherit ['a,string] a constraint 'a = int end Remark also that inheritance at the type level does not presuppose inheritance at the value level, so this should be general enough. Jacques --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG