[Haskell-cafe] RankNTypes question
Nikolay Amiantov
ab at fmap.me
Thu Feb 26 18:50:31 UTC 2015
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.
More information about the Haskell-Cafe
mailing list