[GHC] #10087: DefaultSignatures: error message mentions internal name
GHC
ghc-devs at haskell.org
Wed Apr 20 17:27:52 UTC 2016
#10087: DefaultSignatures: error message mentions internal name
-------------------------------------+-------------------------------------
Reporter: andreas.abel | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.8.4
checker) |
Resolution: | Keywords: Generics
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: infoneeded => new
Comment:
Thanks, Simon!
[https://ghc.haskell.org/trac/ghc/ticket/10087?replyto=8#comment:7 This
comment] helps tremendously in figuring out how things currently work.
Replying to [comment:8 simonpj]:
> So we need something like
> {{{
> No instance for (Eq D) arising from
> the generic default method for `reflexive`
> In the instance declaration for ‘C D’
> }}}
> Would that be about right?
I agree completely! I was confused because after reading
[https://ghc.haskell.org/trac/ghc/ticket/10087?replyto=8#comment:1 Pedros'
comment], I was under the impression he was implying that code should be
legal. I probably misinterpreted it wildly and came to a very wrong
conclusion.
> Better perhaps to do what happens for non-generic default methods, which
is to generate typechecked code directly (and emit some constraints).
Compare what we do for the `Nothing` case of `DefMethInfo` in `tc_default`
in `tcMethods` in `TcInstDcls`.
>
> Does that make sense?
That seems sensible. Clearly, the mechanism we use for `VanillaDM` works
well, because I've never seen an error message mention a name that begins
with `$dm` :) If we modify the code that handles `GenericDM` to use the
same tricks, that would probably make the error message much more
palatable. We could also insert the phrase `"the generic default method
for"` to make the origin of the issue clearer.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10087#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list