#2907: generalized newtype deriving not working with polymorphic component
---------------------------------+------------------------------------------
Reporter: jeltsch | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: normal | Resolution: wontfix
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Changes (by simonpj):
* status: new => closed
* difficulty: => Unknown
* resolution: => wontfix
Comment:
No, sorry, you'll have to write this one by hand! The newtype deriving
stuff works when there is an existing instance that is related ''only by a
newtype'' to the new instance you want. Thus
{{{
newtype N = MkN <old-type>
}}}
But there is no instance `Monad (forall result. ContT result monad o)`.
One could imagine a further extension to handle this, somehow, but I don't
think it'd be easy.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2907#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs