From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id D817FBBAF for ; Thu, 12 Mar 2009 02:42:47 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAPsFuEmCNhAB/2dsb2JhbADSQIQNBg X-IronPort-AV: E=Sophos;i="4.38,346,1233529200"; d="scan'208";a="25451308" Received: from kurims.kurims.kyoto-u.ac.jp ([130.54.16.1]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Mar 2009 02:42:43 +0100 Received: from localhost (orion [130.54.16.5]) by kurims.kurims.kyoto-u.ac.jp (8.13.8/8.13.8) with ESMTP id n2C1gbPX007354; Thu, 12 Mar 2009 10:42:38 +0900 (JST) Date: Thu, 12 Mar 2009 10:42:23 +0900 (JST) Message-Id: <20090312.104223.223346644.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 From: Jacques Garrigue In-Reply-To: References: X-Mailer: Mew version 4.2 on Emacs 22.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; recursive:01 markus:01 mottl:01 markus:01 mottl:01 damien:01 damien:01 type-checker:01 recursive:01 inference:01 iirc:01 object-:01 recursion:01 ocaml:01 annotations:01 From: Markus Mottl > On Wed, Mar 11, 2009 at 12:16, Damien Doligez wrote: > > That is not quite true any more. =A0For 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. =A0Note that I didn't do that from scrach, > > I used an infrastructure that was already present for seeding the > > type inference in some cases. =A0IIRC, 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