[GHC] #8503: New GeneralizedNewtypeDeriving check still isn't permissive enough
GHC
ghc-devs at haskell.org
Tue Nov 19 16:50:52 UTC 2013
#8503: New GeneralizedNewtypeDeriving check still isn't permissive enough
-------------------------------------+------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets: #8541
-------------------------------------+------------------------------------
Comment (by nomeata):
Have you checked that it fails? I believe it would work:
{{{
Coercible (Maybe (Fix Maybe)) (Fix Maybe)
}}}
is only matched by
{{{
instance Coercible a (Maybe (Fix Maybe) => Coercible a (Fix Maybe)
}}}
so we are left with
{{{
Coercible (Maybe (Fix Maybe)) (Maybe (Fix Maybe))
}}}
which is solved by the reflexive instance
{{{
Coercible a a
}}}
(I’m not claiming that all cases work as smoothly, but they need to be a
bit more constructed :-))
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8503#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list