[GHC] #12791: Superclass methods could be more aggressively specialised.
GHC
ghc-devs at haskell.org
Tue Nov 1 17:39:17 UTC 2016
#12791: Superclass methods could be more aggressively specialised.
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
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):
Like I say, I could imagine a special case for the situation where the
constraint is `C t1 .. tn` and it can be solved by a top-level instance
that has no context. It'd be ad-hoc but probably useful, and I agree that
the "might use the wrong dictionary" thing is probably an edge case.
Beyond that, as I show above, I don't think we can use top-level
instances.
What I don't know is whether this special case would solve the "ton of
cases" that you have seen in your code.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12791#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list