[GHC] #10598: DeriveAnyClass and GND don't work well together
GHC
ghc-devs at haskell.org
Wed Aug 3 23:16:20 UTC 2016
#10598: DeriveAnyClass and GND don't work well together
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: RyanGlScott
Type: bug | Status: patch
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 7.11
Resolution: | Keywords: Generics
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2280
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by oerjan):
After reading the ghc-devs discussion that decided to rename `builtin` to
`bespoke`, I have a question.
Is it still the case that using any other deriving strategy than `bespoke`
for a class that supports `bespoke` requires using this new extension? The
summary of the new system in the mailing list discussion seemed to imply
not in some cases, but that could be just my misunderstanding.
If not, then that could lead to confusing errors, like accidentally
deriving `Functor` with anyclass because `DeriveAnyClass` is enabled but
`DeriveFunctor` has been forgotten, and would probably warrant some more
warnings.
On the other hand, I think GND would give equivalent result to `bespoke`
for many classes, so it might be convenient ''not'' to warn in those
cases. E.g. when someone wants to derive `Functor`, `Applicative` and
`Monad` for their monad stack newtype, it seems almost reasonable that
only GND needs to be enabled, and not `DeriveFunctor`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10598#comment:40>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list