
#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) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Replying to [comment:3 dreixel]:
Simon, is there a good reason for `tc_default` in `TcInstDcls` to treat `DefMeth` so differently from `GenDefMeth`?
No there isn't. See `tc_default` in `tcMethods` in `TcInstDcls`. * For polymorphic default methods, `DefMeth`, we generate ''typechecked'' `HsSyn Id`; see `Note [Default methods in instances]`. * For generic default methods, `GenDefMeth`, we currently generate ''renamed'' `HsSyn Name`, and then feed it to the type checker. * For user-written methods, `NoDefMeth`, we obviously just typecheck what the user wrote. I think it'd be pretty simple to instead treat `GenDefMeth` more like `DefMeth`. It might be a bit more code, but we'd get decent error messages. Do you think you could do that? I can advise. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10087#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler