Overlapping and incoherent instances

Herbert Valerio Riedel hvr at gnu.org
Tue Jul 29 09:50:08 UTC 2014


On 2014-07-29 at 11:29:45 +0200, Niklas Hambüchen wrote:
>> instance {-# OVERLAPPABLE #-} Show a => Show [a] where …
>
> Is the syntax somewhat flexible in where the pragma can be placed?
> For example, some might prefer
>
>   {-# OVERLAPPING #-}
>   instance Show [Char] where …

This variant may also be more convenient in cases where you need to
CPP-guard that pragma, as it's on a separate line.


More information about the ghc-devs mailing list