
#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: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * keywords: => CustomTypeErrors Comment: Ah. You're arguing something different, then. You're proposing that if you have a type class instance with `TypeError` in the context (such as the three instances in comment:1), then GHC should reject that instance itself, instead of rejecting //uses// of that instance. This would be a pretty big breaking change. There is a lot of code out there which relies on the ability to use `TypeError` constraints in instance contexts. (For examples see the [http://git.haskell.org/ghc.git/blob/5d76846405240c051b00cddcda9d8d02c880968e... T14339 test case].) I think if you want to see this behavior be enshrined into GHC, you should first submit a proposal to the [https://github.com /ghc-proposals/ghc-proposals GHC proposals repo], and argue why this behavior is more desirable over the status quo. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15052#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler