[Haskell-cafe] RankNTypes question
Nikolay Amiantov
ab at fmap.me
Thu Feb 26 18:19:01 UTC 2015
Hi Cafe,
I can't find how can I do this:
{-# LANGUAGE RankNTypes #-}
example :: forall a. (forall b. b) -> a
example = undefined
The first `forall` is for cosmetic reasons. If I understand correctly
this is a safe and legit function (please correct me if I'm wrong!). I
thought that I can just define `example = id` and GHC would do the rest,
but alas, that didn't happen.
Thanks!
--
Nikolay.
More information about the Haskell-Cafe
mailing list