[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).
Showing
- ghc/compiler/typecheck/Inst.lhs 8 additions, 8 deletionsghc/compiler/typecheck/Inst.lhs
- ghc/compiler/typecheck/TcMatches.lhs 1 addition, 1 deletionghc/compiler/typecheck/TcMatches.lhs
- ghc/compiler/typecheck/TcSimplify.lhs 38 additions, 15 deletionsghc/compiler/typecheck/TcSimplify.lhs
- ghc/compiler/types/InstEnv.lhs 36 additions, 13 deletionsghc/compiler/types/InstEnv.lhs
Loading
Please register or sign in to comment