From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA25103; Wed, 3 Mar 2004 16:19:33 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 QAA25100 for ; Wed, 3 Mar 2004 16:19:31 +0100 (MET) Received: from mxfep01.bredband.com (mxfep01.bredband.com [195.54.107.70]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i23FJQIq023190 for ; Wed, 3 Mar 2004 16:19:27 +0100 Received: from authorize.quake3arena.com ([213.112.182.98] [213.112.182.98]) by mxfep01.bredband.com with ESMTP id <20040303151912.IXTT15163.mxfep01.bredband.com@authorize.quake3arena.com> for ; Wed, 3 Mar 2004 16:19:12 +0100 Original-Sender: phubuh@phubuh.org To: caml-list@inria.fr Subject: Re: [Caml-list] Typechecking madness References: <40434623.6040100@baretta.com> <20040303171627X.garrigue@kurims.kyoto-u.ac.jp> From: Mikael Brockman In-Reply-To: <20040303171627X.garrigue@kurims.kyoto-u.ac.jp> Date: 03 Mar 2004 16:19:11 +0100 Message-ID: <87llmiyn4g.fsf@authorize.quake3arena.com> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 jacques:01 baretta:01 baretta:01 pxp:01 pxp:01 ellipsis:01 ellipsis:01 faq:01 jacques:01 bug:01 faq:01 beginner's:01 beginners:01 gnus:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 35 Jacques Garrigue writes: > From: Alex Baretta > > I'm sure the typechecker knows what he's doing, but the following error > > message does look strange. > > > > This expression has type > > 'a. (('a Pxp_document.node #Pxp_document.extension as 'a) -> unit) -> > > unit > > but is here used with type > > 'b. (('b Pxp_document.node #Pxp_document.extension as 'b) -> unit) -> > > unit > > > > Is this due to the two '#' signs on Pxp_document.extension, yielding two > > different ellipsis type variables? > > Indeed, this is a strange error message. > As far as I can see, it really says "This expression has type t but is > here used with type t". 'a and 'b are bound variables, so the ellipsis > is not the problem. > Even if the type checking is correct in detecting a type error, this > is not a valid error message. Actually, the first expert FAQ [1] addresses a (valid) such error message. Briefly, this kind of error occurs when you have defined two types with the same name, which is easy to do when you're using the REPL. > Can you send me a sufficiently small program exhibiting this > behaviour? > > Jacques Garrigue > > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Footnotes: [1] http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html#message_incomprehensible (Sorry, Jacques, for sending you this message once in private. I keep expecting R in Gnus to reply to the list. :-)) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners