[GHC] #15434: DerivingVia (and perhaps even GND) works badly with DeriveGeneric
GHC
ghc-devs at haskell.org
Tue Jul 24 14:15:42 UTC 2018
#15434: DerivingVia (and perhaps even GND) works badly with DeriveGeneric
-------------------------------------+-------------------------------------
Reporter: konn | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version:
Resolution: | Keywords: deriving
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* keywords: => deriving
Comment:
I'm not sure what the bug is here. You're explicitly requesting that you
reuse the `Generic` instance for `Bad Foo`, and lo and behold, GHC gives
you it. If you don't like this behavior, don't combine `DerivingVia` with
`Generic`—the former wasn't meant to be combined with the latter (indeed,
this code will give an error if combined with the `Safe` extension).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15434#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list