Ticket #3145 (closed bug: fixed)
ImpredicativeTypes vs. LiberalTypeSynonyms
Description
Consider the following module:
{-# LANGUAGE Rank2Types #-}
module RunMud where
import Control.Monad.State
type Mud = StateT MudState IO
data MudState = MudState { mRunMud :: RunMud }
type RunMud = forall a. Mud a -> IO a
getRunMud :: Mud RunMud
getRunMud = do
s <- get
return (mRunMud s)
GHC suggests:
Illegal polymorphic or qualified type: RunMud Perhaps you intended to use -XImpredicativeTypes
When I add a language pragma for ImpredicativeTypes?, GHC stills comes up with the same error message.
Two questions:
1) Can GHC please not suggest enabling extensions that are already enabled? It's very confusing.
2) Can GHC in this specific case suggest LiberalTypeSynonyms?? That's the third extension that needed to be on for this example to compile.
Change History
Note: See
TracTickets for help on using
tickets.
