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.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 47418BC0A for ; Wed, 23 May 2007 11:23:57 +0200 (CEST) Received: from hades.snarc.org (hades.snarc.org [212.85.152.11]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4N9Nunq014658 for ; Wed, 23 May 2007 11:23:57 +0200 Received: by hades.snarc.org (Postfix, from userid 1000) id 5E14A1B4D7; Wed, 23 May 2007 11:19:09 +0200 (CEST) Date: Wed, 23 May 2007 11:19:09 +0200 To: skaller Cc: David Teller , OCaml Subject: Re: [Caml-list] Teaching bottomline, part 3: what should improve. Message-ID: <20070523091909.GA8019@snarc.org> References: <1179871823.6966.78.camel@Blefuscu> <1179875804.17533.33.camel@rosella.wigram> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1179875804.17533.33.camel@rosella.wigram> X-Warning: Email may contain unsmilyfied humor and/or satire. User-Agent: Mutt/1.5.13 (2006-08-11) From: tab@snarc.org (Vincent Hanquez) X-Miltered: at concorde with ID 4654082C.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 inference:01 inference:01 cheers:01 23,:98 wrote:01 wrote:01 caml-list:01 functions:01 inferred:02 contributed:02 face:97 explicit:03 somewhat:05 On Wed, May 23, 2007 at 09:16:44AM +1000, skaller wrote: > On Tue, 2007-05-22 at 18:10 -0400, David Teller wrote: > > > * Error messages of the type system are somewhat obscure. The reflex of > > many students is "OCaml wants it to be of type XXX", rather than "there > > is a contradiction in what I wrote". It would be nice if there was a way > > to ask OCaml to display additional information on type errors. > > This is a long standing peeve of mine. Lets face it: Ocaml just lies. > If it has inferred a type, then finds a contradiction, it should > report both the location of the contradication AND all of the source > lines that contributed to the inference. I agree, this is one of the worst thing about ocaml type inference, and you sometimes end up to have to put explicit type to functions to find the offending lines (usually hundreds lines before the actual line that's printed), defeating the whole thing... Cheers, -- Vincent Hanquez