caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: markus.mottl@gmail.com
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] typing problem with sexplib and mutually recursive polymorphic types
Date: Thu, 12 Mar 2009 10:42:23 +0900 (JST)	[thread overview]
Message-ID: <20090312.104223.223346644.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <f8560b80903110943p72968b3dr74631276b400ba58@mail.gmail.com>

From: Markus Mottl <markus.mottl@gmail.com>
> On Wed, Mar 11, 2009 at 12:16, Damien Doligez <damien.doligez@inria.fr> wrote:
> > That is not quite true any more.  For example, I changed the
> > type-checker a few years ago to start with the user-provided type
> > when typing a let rec, in order to be able to debug my large
> > recursive definitions.  Note that I didn't do that from scrach,
> > I used an infrastructure that was already present for seeding the
> > type inference in some cases.  IIRC, it is there for some object-
> > oriented reason.
> 
> Interesting, this change seems to have passed unobserved by me and is
> certainly a great debugging aid.  Does this mean that eventually
> polymorphic recursion might be supported by OCaml?  What's still
> missing for that feature?

Actually I added universal type annotations and polymorphic recursion
in a branch a few years ago. The idea was to provide a basis for
implementing GADTs. But since the GADT work was not finished, it was
never merged in the main trunk.

So it would be very easy to have polymorphic recursion in ocaml.
The real question is whether it is that useful in the absence of
GADTs, knowing that you can already do it in a somewhat verbose way.

Cheers,

Jacques Garrigue


  parent reply	other threads:[~2009-03-12  1:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11  2:45 Yoann Padioleau
2009-03-11  4:25 ` [Caml-list] " Markus Mottl
2009-03-11  6:11   ` yoann padioleau
2009-03-11 14:20     ` Markus Mottl
2009-03-11 14:32       ` Yitzhak Mandelbaum
2009-03-11 14:44         ` Markus Mottl
2009-03-11 16:16           ` Damien Doligez
2009-03-11 16:43             ` Markus Mottl
2009-03-11 19:03               ` Till Varoquaux
2009-03-12  1:42               ` Jacques Garrigue [this message]
2009-03-11 23:08         ` Yoann Padioleau

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=20090312.104223.223346644.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=markus.mottl@gmail.com \
    /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).