Browse thread
how to upset the ocaml type system....
-
Pietro Abate
- David Allsopp
-
Daniel de Rauglaudre
-
Christophe Raffalli
-
Oliver Bandel
- Daniel de Rauglaudre
- Christophe Raffalli
-
Oliver Bandel
-
Christophe Raffalli
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-08-29 (15:48) |
From: | Daniel de Rauglaudre <daniel.de_rauglaudre@i...> |
Subject: | Re: [Caml-list] how to upset the ocaml type system.... |
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/