#3145: ImpredicativeTypes vs. LiberalTypeSynonyms
----------------------------------+-----------------------------------------
Reporter: MartijnVanSteenbergen | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.10.1 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
----------------------------------+-----------------------------------------
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3145>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs