[GHC] #7809: Silly error message suggesting LiberalTypeSynonyms
GHC
cvs-ghc at haskell.org
Wed Apr 3 18:19:06 CEST 2013
#7809: Silly error message suggesting LiberalTypeSynonyms
-----------------------------+----------------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.7 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
The following code (rightly) does not compile:
{{{
{-# LANGUAGE RankNTypes, TypeFamilies, LiberalTypeSynonyms #-}
type PolyId = (forall a. a -> a)
type family F a
foo :: F PolyId
foo = undefined
}}}
The error message is
{{{
Illegal polymorphic or qualified type: PolyId
Perhaps you intended to use -XLiberalTypeSynonyms
In the type signature for `foo': foo :: F PolyId
}}}
The code doesn't compile because we can't apply a type family to a
polytype. The first line of the error message says this well enough,
though more information might be helpful here. However, the second line of
the error message is silly: I've turned on {{{LiberalTypeSynonyms}}}!
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7809>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list