#5737: Template Haskell can't derive Read, Show, Eq instances
---------------------------------+------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.6.1
Component: Template Haskell | Version: 7.0.4
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by igloo):
* difficulty: => Unknown
* milestone: => 7.6.1
Comment:
Thanks for the report.
7.4 and HEAD are giving a different error:
{{{
Ambiguous type variable `t0' in the constraint:
(Show t0)
arising from the 'deriving' clause of a data type declaration
Probable fix: use a 'standalone deriving' declaration instead
When deriving the instance for (Show Alpha)
In the Template Haskell quotation
[d| data Alpha = Alpha $(conT n) deriving (Show, Read) |]
In the expression:
[d| data Alpha = Alpha $(conT n) deriving (Show, Read) |]
Failed, modules loaded: none.
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5737#comment:2>
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