Inferred type is less polymorphic than expected?

Benjamin Franksen benjamin.franksen at bessy.de
Fri Jul 29 21:24:50 EDT 2005


On Saturday 30 July 2005 01:46, Thomas Jäger wrote:
> This is not a bug, the restriction is actually mentioned in the
> Haskell Report, section 4.5.2. However, the restriction was recently
> lifted, so your code compiles fine with the current cvs ghc, see
>
> > http://www.haskell.org/pipermail/glasgow-haskell-users/2005-July/00
> >8786.html
>
> Thomas
>
> On 7/29/05, Benjamin Franksen <benjamin.franksen at bessy.de> wrote:
> > Bug.lhs:27:0:
> >     Contexts differ in length
> >     When matching the contexts of the signatures for
> >       printer :: Viewer
> >       printCatalog :: forall c. (Catalog c) => View c
> >     The signature contexts in a mutually recursive group should all
> > be identical

Thank you for clarifying the cause of the second error message. Is there 
a connection to the first one? Note, I have a version of the program, 
where I only get the "Inferred type is less polymorphic than expected" 
error message and this one also disappears as soon as I use a lambda 
instead of a top-level function to initialize the record.

Ben


More information about the Glasgow-haskell-users mailing list