[Haskell-cafe] forall in a lambda abstraction

Scott J. jscott at skynet.be
Fri May 20 09:56:05 EDT 2005


Hello,

what's wrong with the code of test1 below. Ghci does complain with an error message that I don't understand.

Thanks
Jan


id x = x
test1 = \f ::(forall a. a -> a) -> (f True,f 'a')  
test = \f -> (f True,f False)
h :: (forall a. a->a) -> (Bool,Char)
--h :: (a.a -> a) -> (Bool,Char)
h id = (id True, id 'a')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/haskell-cafe/attachments/20050520/a863084d/attachment.htm


More information about the Haskell-Cafe mailing list