caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] how to upset the ocaml type system....
Date: Wed, 29 Aug 2007 17:48:26 +0200	[thread overview]
Message-ID: <20070829154826.GB27197@yquem.inria.fr> (raw)
In-Reply-To: <1188399496.46d589880d7a3@webmail.in-berlin.de>

Hi,

On Wed, Aug 29, 2007 at 04:58:16PM +0200, Oliver Bandel wrote:

> Where could the problem behind this kind of functions
> occure in practical programming?

This example is just academic. The resulting value of this example is
an enormous value composed of a tree of couples of couples of couples
of couples... (and so on, depending on the level), and all "leaves"
are the same identical function. No interest.

But this reminds that the algorithm of type inference is exponential of
exponential in number of created type variables. In most programs, many
of these type variables are identical, and the algorithm shares them
using references.

In this example, all created type variables are different. The result
is a very complicated type, unuseful in practice.

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/


  reply	other threads:[~2007-08-29 15:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-28 13:18 Pietro Abate
2007-08-28 21:21 ` [Caml-list] " David Allsopp
2007-08-29  0:56 ` Daniel de Rauglaudre
2007-08-29 10:57   ` Christophe Raffalli
2007-08-29 14:58     ` Oliver Bandel
2007-08-29 15:48       ` Daniel de Rauglaudre [this message]
2007-08-29 16:15     ` Christophe Raffalli

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=20070829154826.GB27197@yquem.inria.fr \
    --to=daniel.de_rauglaudre@inria.fr \
    --cc=caml-list@inria.fr \
    /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).