[GHC] #15052: DeriveAnyClass instances may skip TypeError constraints
GHC
ghc-devs at haskell.org
Wed Apr 18 15:36:08 UTC 2018
#15052: DeriveAnyClass instances may skip TypeError constraints
-------------------------------------+-------------------------------------
Reporter: jcpetruzza | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
| CustomTypeErrors
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by jcpetruzza):
Let's forget about the program in comment:1, I understand what GHC is
doing there and I agree it is the expected behaviour. :)
The issue is only shown in the program of comment:5. In this program **
`C` has an empty context**, so writing
{{{#!haskell
data TS = TSL | TSR deriving (Gen.Generic, C)
}}}
and writing
{{{#!haskell
data TS = TSL | TSR deriving (Gen.Generic)
instance C TS
}}}
should have the same result, but it doesn't. The first form is accepted,
the second one is rejected (as expected).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15052#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list