Superclass defaults

Sebastian Fischer fischer at
Wed Aug 31 14:14:52 CEST 2011

On Wed, Aug 31, 2011 at 4:21 PM, Simon Peyton-Jones
<simonpj at> wrote:
> There seems to be a lot of support for Option 3... but what about Option 2 (ie pre-empt but give a warning)?

I notice that the idea to only issue a warning if the explicit and
implicit instances are in different modules was already halfway
towards reaching option 2.

I think it is fine to issue warnings also if both instances are in the
same module. For newly written code, an explicit hiding clause removes
context dependence (as Conor points out) so the warning is justified.
For existing code where it generates too much noise the warning could
be switched of selectively until the code gets cleaned up.


More information about the Glasgow-haskell-users mailing list