[GHC] #9334: Implement "instance chains"
GHC
ghc-devs at haskell.org
Wed Aug 24 17:22:52 UTC 2016
#9334: Implement "instance chains"
-------------------------------------+-------------------------------------
Reporter: diatchki | Owner: diatchki
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.9
checker) |
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 Iceland_jack):
Replying to [comment:6 diatchki]:
> 2. "Fails instances", which are of the form `instance Num Char fails`;
they enable programmers to state explicitly that an instance should never
exits. Interestingly, I just found a very related ticket asking for the
same sort of thing (#7775).
Using `Any` as a superclass we can effectively
[https://gist.github.com/Icelandjack/5afdaa32f41adf3204ef9025d9da2a70
#hackage-no-instances-allowed forbid instances], of course the compiler is
not privy to this.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9334#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list