From: Pierre Weis <Pierre.Weis@inria.fr>
Subject: Re: polymorphic recursion
To: email@example.com (Simon Helsen)
Date: Tue, 22 Sep 1998 18:33:54 +0200 (MET DST)
In-Reply-To: <Pine.A220.127.116.110922172125.2728W-100000@modas> from "Simon Helsen" at Sep 22, 98 05:28:45 pm
> 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 -
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.
INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:16 MET