[project @ 2000-06-22 14:45:41 by simonpj]
authorsimonpj <unknown>
Thu, 22 Jun 2000 14:45:41 +0000 (14:45 +0000)
committersimonpj <unknown>
Thu, 22 Jun 2000 14:45:41 +0000 (14:45 +0000)
commit5f3528244ad3ec004bb67a8a2ec086fe90318ce7
tree69216165a7e9ae2a862289b2be1e51a7b8df2d09
parentfad3991be5c706bd094980fc0c6588162d7bf797
[project @ 2000-06-22 14:45:41 by simonpj]
*** NO NEED TO MERGE WITH 4.07 ***
    (but it would do no harm)

* Improve an error message when overlapping instance
  declarations are present.  Carl Witty reported this
  infelicitous message.  The problem arises for this code:

class Foo a
class (Foo a) => Bar a

data Dat a = Dat

instance Foo (Dat a)
instance Foo (Dat Integer)

instance Bar (Dat a)

  The instance decl for Bar should say

instance Foo (Dat a) => Bar (Dat a)

  because the overlapping instance decls for Foo can't
  be resolved (or at least might vary depending on how
  a is instantiated).
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcMatches.lhs
ghc/compiler/typecheck/TcSimplify.lhs
ghc/compiler/types/InstEnv.lhs