[GHC] #8030: FlexibleContexts PolyKinds Type Families bug
GHC
ghc-devs at haskell.org
Tue Jul 2 22:46:11 CEST 2013
#8030: FlexibleContexts PolyKinds Type Families bug
---------------------------------+------------------------------------------
Reporter: wvv | Owner:
Type: bug | Status: closed
Priority: normal | Component: Compiler
Version: 7.6.3 | Resolution: invalid
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by goldfire):
* status: new => closed
* resolution: => invalid
Comment:
This looks like correct behavior to me.
The problem is that the type signatures for `mempty` and `mappend` are
inherently ambiguous. Because GHC cannot know whether `Pr` is injective,
there is no way to get the identity of the type `a` from the identity of
`Pr a`. Thus, all uses of `mempty` and `mappend` will be ambiguous. This
ambiguity is what is causing the error you see.
It's possible that the definitions of `mempty` and `mappend` as given
should be rejected, but the error you're seeing looks correct to me.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/8030#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list