Re: polymorphic recursion

From: Pierre Weis (
Date: Tue Sep 22 1998 - 18:33:54 MET DST

From: Pierre Weis <>
Message-Id: <>
Subject: Re: polymorphic recursion
To: (Simon Helsen)
Date: Tue, 22 Sep 1998 18:33:54 +0200 (MET DST)
In-Reply-To: <Pine.A32.3.96.980922172125.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 -
> 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,,

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:16 MET