caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pierre Weis <Pierre.Weis@inria.fr>
To: helsen@informatik.uni-tuebingen.de (Simon Helsen)
Cc: caml-list@inria.fr
Subject: Re: polymorphic recursion
Date: Tue, 22 Sep 1998 18:33:54 +0200 (MET DST)	[thread overview]
Message-ID: <199809221633.SAA28035@pauillac.inria.fr> (raw)
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, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/







  reply	other threads:[~1998-09-22 16:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-21 16:30 Peter J Thiemann
1998-09-22  2:33 ` Jacques GARRIGUE
1998-09-22  9:22   ` Pierre Weis
1998-09-22 10:00     ` Simon Helsen
1998-09-22 15:06       ` Pierre Weis
1998-09-22 15:28         ` Simon Helsen
1998-09-22 16:33           ` Pierre Weis [this message]
1998-09-22 15:50         ` Pierre CREGUT - FT.BD/CNET/DTL/MSV
1998-09-22 17:14           ` Xavier Leroy
1998-09-28  9:51             ` Pierre Weis
1998-09-28 11:45               ` Peter Thiemann
1998-09-28 13:00                 ` Pierre Weis
1998-10-05 14:27               ` Local definitions Anton Moscal
1998-10-12 11:39                 ` Xavier Leroy
1998-10-12 17:20                   ` Adam P. Jenkins
1998-10-14 13:47                   ` Anton Moscal
1999-08-22 20:35 Polymorphic recursion Hongwei Xi
1999-08-23 12:19 ` Pierre Weis
2007-04-03 16:59 Loup Vaillant
2007-04-04 13:49 ` [Caml-list] " Roland Zumkeller
2007-04-04 15:13   ` Alain Frisch
2007-04-04 15:50     ` Stefan Monnier
2008-05-12 21:55 polymorphic recursion Jacques Le Normand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199809221633.SAA28035@pauillac.inria.fr \
    --to=pierre.weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=helsen@informatik.uni-tuebingen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).