[Haskell-cafe] RankNTypes question
Marcin Mrotek
marcin.jan.mrotek at gmail.com
Thu Feb 26 18:53:41 UTC 2015
Ah sorry, I think I responded only to you, not to the whole list. If
anyone else is interested, my answer was:
test :: (forall a. a -> a) -> Int -> Int
test f a = f a
Also consider this:
foo :: Maybe a -> Maybe b
foo Nothing = Nothing
vs.
foo :: Maybe a -> Maybe b
fooo a at Nothing = a
You don't actually need RankNTypes to bump into this. Don't feel
stupid, I remember running into this kind of things frequently when I
was trying to define Prisms (from lens) by hand ;)
Kind regards,
Marcin Mrotek
More information about the Haskell-Cafe
mailing list