[GHC] #7873: A poly-kinded newtype existential crisis
GHC
cvs-ghc at haskell.org
Tue Apr 30 21:02:27 CEST 2013
#7873: A poly-kinded newtype existential crisis
--------------------------------------+-------------------------------------
Reporter: ekmett | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.6.3 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC rejects valid program | Blockedby:
Blocking: | Related:
--------------------------------------+-------------------------------------
The following code worked on older GHCs and on other compilers clear back
to Hugs, but based on reports I'm getting from a half-dozen users appears
to broken on GHC 7.6.1+ and in GHC HEAD.
{{{
class Reifies s a | s -> a where
reflect :: proxy s -> a
data Proxy a = Proxy
newtype Magic a r = Magic (forall s. Reifies s a => Proxy s -> r)
}}}
{{{
fast/Data/Reflection.hs:92:21:
A newtype constructor cannot have an existential context,
but `Magic' does
In the definition of data constructor `Magic'
}}}
There doesn't appear to be anything existential going on there, but that
said, this issue does only occur when PolyKinds are turned on, so perhaps
the issue is with the desugaring into PolyKinds?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7873>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list