On 16 October 2011 08:51, Stephen Tetley <stephen.tet...@gmail.com> wrote:
> On 15 October 2011 23:56, Bas van Dijk <v.dijk....@gmail.com> wrote:
>> On 15 October 2011 23:17, Ertugrul Soeylemez <e...@ertes.de> wrote:
>>> Both instances are valid here, and there is no mechanism to choose one of 
>>> them.
>>
>> There is: OverlappingInstances[1] chooses the most specific instance.
>> So in case someVector :: Vector Word8 the instance Show (Vector Word8)
>> is chosen because it's the most specific.
>
> This has the problem of incoherence in multi-module programs - GHC
> might chose different instances for the same type depending on
> compilation order. For a Show instance, this may be acceptable.

But is this a problem when both instances are exported from the same
module and OverlappingInstances is only enabled in that module, as is
the case here?

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to