Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Typechecking madness
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Typechecking madness
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.
Can you send me a sufficiently small program exhibiting this

        Jacques Garrigue

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: