5 Nov
2011
5 Nov
'11
3:42 a.m.
Hello, this code is accepted by GHC 7.0.4:
{-# LANGUAGE ImpredicativeTypes #-}
polyId :: (forall a. a) -> a polyId x = x
polyIdMap :: [forall a. a] -> [forall a. a] polyIdMap xs = fmap polyId xs
However, this one isn’t:
{-# LANGUAGE ImpredicativeTypes #-}
polyId :: (forall a. Maybe a) -> Maybe a polyId x = x
polyIdMap :: [forall a. Maybe a] -> [forall a. Maybe a] polyIdMap xs = fmap polyId xs
Is there a way to make it accepted? Best wishes, Wolfgang