[Haskell-cafe] Strange Type Error

jean-christophe mincke jeanchristophe.mincke at gmail.com
Thu May 26 12:01:03 CEST 2011


Hello,

Could anyone help me understand what is wrong with the definition of f2 in
the code below?


class C a b where
    convert :: a -> b

convertToInt :: (C a Int) => a -> Int
convertToInt x = convert x

f1 x =  convertToInt x

f2 = \x -> convertToInt x

f3 :: (C a Int) => a -> Int
f3 = \x -> convertToInt x

Thank you

Regards

J-C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110526/82f4f10c/attachment.htm>


More information about the Haskell-Cafe mailing list