[GHC] #4815: Instance constraints should be used when deriving on associated data types
GHC
ghc-devs at haskell.org
Mon Oct 24 16:16:37 UTC 2016
#4815: Instance constraints should be used when deriving on associated data types
-------------------------------------+-------------------------------------
Reporter: batterseapower | Owner:
Type: feature request | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 6.12.3
Resolution: | Keywords:
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 simonpj):
I think Max was asking for something less fundamental. He just wanted the
`deriving` clause on the original instance decl to infer an instance
context of `Eq (Associated a)`. That's usually not allowed for `deriving`
clauses but he argues that in the context of a class instance decl, it
should.
So it's just to do with the relatively narrow question of "what context
does one infer for a deriving clause?".
Since the standalone deriving clause is available, I'm inclined to say
"use the standalone route". It's just clearer. But I'm not terribly
bothered.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4815#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list