Overlapping and incoherent instances

Johan Tibell johan.tibell at gmail.com
Tue Jul 29 10:48:08 UTC 2014


On Tue, Jul 29, 2014 at 12:37 PM, Daniel Trstenjak
<daniel.trstenjak at gmail.com> wrote:
>
> On Tue, Jul 29, 2014 at 12:02:19PM +0200, Johan Tibell wrote:
>> What's the rationale to not require
>>
>> {-# OVERLAPPING Show [Char] #-}
>>
>> here? Perhaps it's too annoying to have to repeat the types?
>
> This one might be written at the top of the file, so it would be easier
> to overlook it, than having it directly at the instance declaration,
> which seems to be one of the major points for OVERLAPPING and OVERLAPPABLE.

The same could be said for e.g. INLINE. The extra flexibility is nice
to have (e.g. because you can opt to put the pragma after the
declaration, to de-emphasize it.)


More information about the ghc-devs mailing list