[Haskell-cafe] Trouble with types

Vladimir Reshetnikov v.reshetnikov at gmail.com
Mon Jun 1 08:44:37 EDT 2009


Hi,

I tried this code:

-----------------------
f, g :: a -> a
(f, g) = (id, id)
-----------------------

Hugs: OK

GHC:
    Couldn't match expected type `forall a. a -> a'
           against inferred type `a -> a'
    In the expression: id
    In the expression: (id, id)
    In a pattern binding: (f, g) = (id, id)

What does mean this error message?
And what of them (Hugs, GHC) is correct?

Thanks
Vladimir


More information about the Haskell-Cafe mailing list