[GHC] #4896: Deriving Data does not work for attached code
GHC
ghc-devs at haskell.org
Fri Nov 28 20:16:05 UTC 2014
#4896: Deriving Data does not work for attached code
-------------------------------------+-------------------------------------
Reporter: mitar | Owner:
Type: bug | Status: infoneeded
Priority: low | Milestone: 7.10.1
Component: Compiler | Version: 7.1
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* status: new => infoneeded
Comment:
This is the error message with HEAD (7.9.20141125) for the example from
the description.
{{{
Main.hs:17:66:
Couldn't match type ‘t'0 a0’ with ‘Bar’
Expected type: Maybe (c (Bar (D a b)))
Actual type: Maybe (c (t'0 a0 (D a b)))
In the expression: gcast2 f
In an equation for ‘dataCast2’: dataCast2 f = gcast2 f
When typechecking the code for ‘dataCast2’
in a derived instance for ‘Data (Bar (D a b))’:
To see the code I am typechecking, use -ddump-deriv
}}}
And the error message for mojojojo's example from comment:6 with HEAD (see
also #5863):
{{{
test.hs:5:40:
Deriving Typeable is not allowed for family instances;
derive Typeable for ‘DF’ alone
In the data instance declaration for ‘DF’
test.hs:6:42:
Deriving Typeable is not allowed for family instances;
derive Typeable for ‘DF’ alone
In the data instance declaration for ‘DF’
}}}
Is there still a problem here?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4896#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list