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 RAA19005 for caml-redistribution; Mon, 14 Jun 1999 17:47:42 +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 KAA10377 for ; Mon, 14 Jun 1999 10:03:58 +0200 (MET DST) Received: from tcs.inf.tu-dresden.de (tcs.inf.tu-dresden.de [141.76.75.119]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id KAA15853 for ; Mon, 14 Jun 1999 10:03:56 +0200 (MET DST) Received: from ithif20.inf.tu-dresden.de (ithif20 [141.76.75.120]) by tcs.inf.tu-dresden.de (8.9.1a/8.9.1) with SMTP id KAA19274 for ; Mon, 14 Jun 1999 10:02:50 +0200 (MET DST) Received: by ithif20.inf.tu-dresden.de (SMI-8.6/SMI-SVR4) id KAA01028; Mon, 14 Jun 1999 10:04:32 +0200 Date: Mon, 14 Jun 1999 10:04:32 +0200 Message-Id: <199906140804.KAA01028@ithif20.inf.tu-dresden.de> From: Hendrik Tews MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: caml-list@inria.fr Subject: grammar for class types, reraised X-Mailer: VM 6.34 under Emacs 19.34.1 Sender: weis Hi, on May 14th I sent the appended message to the ocaml mailing list. Unfortunately I haven't seen any answer so far. Could one of the developers please answer these questions (or give some pointers)? 1. What is the difference between # class type b = [int, string] a;; and # type c = (int, string) a;; assuming some class type a with two type parameters? And why do I have to use different parentheses in both cases? (Yes, I know, it's what the manual says, but I would expect that one kind of parentheses should be enough for all kind of type parameters. ) 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;; 3. (To re-raise a question from John Prevost which has never been addressed:) Why is it not possible to mix type definitions and class type definitions like in # class type a = object method m : a end # and # type b = Node of a | Tree of b * b (Yes, it is possible to use the < ... > notation, but it is not possible to use # with such types.) Bye, Hendrik