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 SAA09506 for caml-redistribution; Tue, 22 Sep 1998 18:37:21 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA00954 for ; Tue, 22 Sep 1998 18:33:56 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id SAA24644; Tue, 22 Sep 1998 18:33:54 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA28035; Tue, 22 Sep 1998 18:33:54 +0200 (MET DST) From: Pierre Weis Message-Id: <199809221633.SAA28035@pauillac.inria.fr> Subject: Re: polymorphic recursion To: helsen@informatik.uni-tuebingen.de (Simon Helsen) Date: Tue, 22 Sep 1998 18:33:54 +0200 (MET DST) Cc: caml-list@inria.fr In-Reply-To: from "Simon Helsen" at Sep 22, 98 05:28:45 pm X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > right, but there is no polymorphic recursion in Ocaml, is there? As mentioned earlier there is some form of polymorphic recursion in objects. A (limited form of) polymorphic recursion could be added to the core language in the future if we find a simple way to do so. > > We may need explicit Forall keywords to express type schemes in constraints. > > Indeed, this is a problem. Standard ML solves this by defining some > explicit rules for free type variables (section 4.6 of the definition - > p18). As far as I know this rules do not allow the simple expression of polymorphic type scheme in type constraints, since you have to figure out which type variables are quantified and where they are bound (as far as I remember this quantification implicitely occurs at the outermost level of the construct where the type variable appears ?). Explicit quantification would be simple and more explicit. Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/