[GHC] #2456: For higher kinds,
instance declarations need quantification in the context
GHC
trac at galois.com
Thu Aug 21 12:49:36 EDT 2008
#2456: For higher kinds, instance declarations need quantification in the context
-----------------------------+----------------------------------------------
Reporter: ronwalf | Owner:
Type: feature request | Status: reopened
Priority: normal | Milestone: _|_
Component: Compiler | Version: 6.9
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: x86
Os: MacOS X |
-----------------------------+----------------------------------------------
Changes (by simonpj):
* summary: Generics compilation problem: "FATAL:Symbol _XJv_srt already
defined." => For higher kinds, instance
declarations need quantification in the context
* type: bug => feature request
* milestone: => _|_
Comment:
However, concerning your comment above, I had missed the fact that `Expr`
has kind `(*->*) -> *`. What you ''really'' want to say is:
{{{
deriving instance (forall a. Data a => Data (f a)) => Data (Expr f)
}}}
Notice that the context of the instance has a nested `forall`. This has
been a long-standing want; see
[http://research.microsoft.com/%7Esimonpj/Papers/derive.htm Derivable type
classes], Section 7.
So I'll retitle this ticket as a feature request for such a feature. But
don't hold your breath.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2456#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list