From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA12950 for caml-red; Fri, 15 Dec 2000 13:58:46 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA30816 for ; Fri, 15 Dec 2000 11:13:53 +0100 (MET) Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id eBFADqX17467 for ; Fri, 15 Dec 2000 11:13:52 +0100 (MET) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.11.1/2000102300) with ESMTP id LAA05704; Fri, 15 Dec 2000 11:12:55 +0100 (CET) Received: from grizzly.ps.uni-sb.de (grizzly.ps.uni-sb.de [134.96.186.68]) by cs.uni-sb.de (8.11.1/2000102300) with ESMTP id LAA09181; Fri, 15 Dec 2000 11:13:27 +0100 (CET) Received: from ps.uni-sb.de (grieg.ps.uni-sb.de [134.96.186.139]) by grizzly.ps.uni-sb.de (8.11.0/8.9.1) with ESMTP id eBFADSQ18265; Fri, 15 Dec 2000 11:13:28 +0100 Message-ID: <3A39EEC8.2F95098@ps.uni-sb.de> Date: Fri, 15 Dec 2000 11:13:28 +0100 From: Andreas Rossberg Organization: =?iso-8859-1?Q?Universit=E4t?= des Saarlandes X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-22 i686) X-Accept-Language: de, en MIME-Version: 1.0 To: John Max Skaller CC: Mattias Waldau , Caml-List Subject: Re: Functions must be explicitly typed, (was Same label in different types, how do people solve this?) References: <3A36C815.EBA9AE89@ozemail.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr John Max Skaller wrote: > > In Ocaml, terse expression with the _option_ of adding a type > constraint isn't that unreasonable. The real problem is that > the inference engine isn't smart enough to remember _how_ it > deduced a type, and report _both_ locations when there is a > conflict. I have a suspicion this is non-trivial: It is non-trivial because in general the deduction of a type involves arbitrary many `locations'. So you actually had to report some kind of unification trace, which might not be very helpful for the unprepared programmer if it gets too complicated. The actual problem is to find useful heuristics for identifying the `interesting' parts of this information and for presenting it to the user. > probably worth a PhD. :-) There is in fact research going on on this topic, some of it certainly being done by PhD students. ;-) -- Andreas Rossberg, rossberg@ps.uni-sb.de :: be declarative. be functional. just be. ::