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=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 3000DBC0A for ; Wed, 23 May 2007 04:46:24 +0200 (CEST) Received: from web30506.mail.mud.yahoo.com (web30506.mail.mud.yahoo.com [68.142.200.119]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l4N2kMvQ001929 for ; Wed, 23 May 2007 04:46:23 +0200 Received: (qmail 70623 invoked by uid 60001); 23 May 2007 02:46:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=B5TuXgy3c1vUIkilm8wBT0WFH7+XfiuXfstlYdpPVgf3MvBh+JQWg+yulDzT1GZyYLwQ3X57JW1AaDysvAAK5FWac6ejcXvQnqgiczXTVi1ns3/nu+Dvj4L+0gjjpbkllAYGaw8pISNfzscyYct03pBNIXCFIvPOaO5DWrrnQCM=; X-YMail-OSG: cTR30n0VM1m_AwMbyUrh3q2eaTnX7dl2cohZszix1f_G_c7dRAGMgAaTTAcHoUiXZLJVEUIMtvbCHRHYBnscE3g3KgnQMwGt.X8wTnMdKPS6DcrdvjfBfVDiuu32Wg-- Received: from [24.11.154.225] by web30506.mail.mud.yahoo.com via HTTP; Tue, 22 May 2007 19:46:22 PDT Date: Tue, 22 May 2007 19:46:22 -0700 (PDT) From: David Thomas Subject: Re: [Caml-list] Teaching bottomline, part 3: what should improve. To: OCaml In-Reply-To: <1179875804.17533.33.camel@rosella.wigram> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <319338.70616.qm@web30506.mail.mud.yahoo.com> X-Miltered: at concorde with ID 4653AAFE.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; compilation:01 ocaml:01 ocaml:01 inference:01 unification:01 beginner's:01 bug:01 sourceforge:01 beginners:01 wrote:01 wrote:01 imho:01 caml-list:01 caml-list:01 bin:01 Would it be possible for this to be an option? I mean, it seems like the information is at least available on another pass through the code. Twice the compilation time in some cases will typically win out over minutes-to-hours trying to figure out where it inferred THAT. --- 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 understand that is may be hard, if not impossible, > to implement, > as it would require a unification engine that could > manage > source references in parallel with deductions .. > still the information > IS available originally. > > I bet this would be an interesting and valuable PhD > project, > and, IMHO, without it type inferencing languages are > useless > in industry. Type errors in Ocaml code are very > common for the > simple reason they're just about the only error you > can make :) > > > -- > John Skaller > Felix, successor to C++: http://felix.sf.net > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: > http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/