Re: [Haskell-cafe] RankNTypes question

26 Feb
2015
26 Feb
'15
1:50 p.m.
Ah, thanks! For some reason I haven't even thought of it -- I knew that `id` was wrong because of the type, but had no idea what else to try. Feeling stupid now. On 02/26/2015 09:46 PM, Marcin Mrotek wrote:
Well still, id is (a -> a). So given some function (forall b. b -> b) it's result is a function (forall b. b -> b). This works:
test :: (forall a. a -> a) -> Int -> Int test f a = f a
Kind regards, Marcin Mrotek
-- Nikolay.
3737
Age (days ago)
3737
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nikolay Amiantov