Polymorphic implicit parameters
Roman Cheplyaka
roma at ro-che.info
Wed Mar 20 09:58:04 CET 2013
I'm curious as to why GHC doesn't accept the following (contrived)
module:
{-# LANGUAGE ImplicitParams, RankNTypes #-}
f :: (?g :: (forall a . a -> a)) => a -> a
f = ?g
The error message is:
Illegal polymorphic or qualified type: forall a. a -> a
In the type signature for `f':
f :: ?g :: (forall a. a -> a) => a -> a
It's not a big deal since one can wrap the polymorphism in a newtype,
but it's somewhat unexpected.
Roman
More information about the Glasgow-haskell-users
mailing list