On Mon, Jun 09, 2008 at 09:21:02AM +0100, Simon Peyton-Jones wrote:
This isn't great, but it's not really different than is the case for
non-overlapping instances. Suppose module B1 declares 'instance C T',
and uses that instance; and module B2 declares a *different* 'instance
C T', and
Yes indeed, this is one of those well-known (ie not at all well
known, but folk lore) problems with overlapping instances, at least in
programs where different instances can be in scope at different times.
I think these examples are subtly different (eg, some trip up Hugs as
well, some only
Yes indeed, this is one of those well-known (ie not at all well known, but
folk lore) problems with overlapping instances, at least in programs where
different instances can be in scope at different times.
It's discussed (not very clearly) in
This isn't great, but it's not really different than is the case for
non-overlapping instances. Suppose module B1 declares 'instance C T',
and uses that instance; and module B2 declares a *different* 'instance
C T', and uses that instance; and Main imports B1 and B2, but does not
use either
Hello,
(you should be able to copy and paste the code in this email into two
modules called A and B to try it out)
{-# LANGUAGE OverlappingInstances #-}
module A where
This module, together with module 'B', illustrates a problem in some
implementations of overlapping instances and their