From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA17623 for caml-redistribution; Wed, 24 Nov 1999 09:18:37 +0100 (MET) 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 CAA16656 for ; Wed, 24 Nov 1999 02:28:25 +0100 (MET) Received: from beach.frankfurt.netsurf.de (beach.frankfurt.netsurf.de [194.64.181.2]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id CAA22428 for ; Wed, 24 Nov 1999 02:28:23 +0100 (MET) Received: from ice.darmstadt.netsurf.de (board-118.darmstadt.netsurf.de [194.163.86.246]) by beach.frankfurt.netsurf.de (8.8.5/8.8.5) with ESMTP id CAA22595 for ; Wed, 24 Nov 1999 02:28:22 +0100 (MET) Received: from localhost (localhost [[UNIX: localhost]]) by ice.darmstadt.netsurf.de (8.9.3/8.9.3) id CAA00534 for caml-list@inria.fr; Wed, 24 Nov 1999 02:22:33 +0100 From: Gerd Stolpmann Reply-To: Gerd.Stolpmann@darmstadt.netsurf.de Organization: privat To: caml-list@inria.fr Subject: The option -rectypes Date: Wed, 24 Nov 1999 01:59:36 +0100 X-Mailer: KMail [version 1.0.21] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <99112402223302.32002@ice> Content-Transfer-Encoding: 8bit Sender: weis I have some code that compiled in 2.02, but in 2.03 I need the new option -rectypes of the compilers. My class definitions look like (the signatures) class type [ 'node ] extension = object ('self) method clone : 'self method node : 'node method set_node : 'node -> unit end ;; class type [ 'ext ] node = object ('self) constraint 'ext = 'ext node #extension method extension : 'ext (* ... more methods ... *) end ;; This works in both versions out of the box. If I add val f : 'a node extension as 'a the 2.03 compiler only accepts the type if I add -rectypes. I have several questions: - What is the effect of -rectypes? (I did not find a good explanation in the manual.) - What is the background of this change? - I have thought about the type 'a node extension as 'a. If I apply the constraint of "node", the condition must hold that ('a node extension as 'a) node extension unifies with ('a node extension as 'a) node #extension Normally, a closed class type does not unify with an open class type, and I wonder why this is accepted at all. Without -rectypes, the 2.03 compiler only accepts val f : 'a node #extension as 'a but this is a much more difficult type. Gerd -- ---------------------------------------------------------------------------- Gerd Stolpmann Telefon: +49 6151 997705 (privat) Viktoriastr. 100 64293 Darmstadt EMail: Gerd.Stolpmann@darmstadt.netsurf.de (privat) Germany ----------------------------------------------------------------------------