[project @ 1999-11-29 17:34:14 by simonpj]
authorsimonpj <unknown>
Mon, 29 Nov 1999 17:34:33 +0000 (17:34 +0000)
committersimonpj <unknown>
Mon, 29 Nov 1999 17:34:33 +0000 (17:34 +0000)
commite1a4f2a5be6e4cd06d96b601fefd519c2569ba99
tree0662cb81d93c7bd866235bf4d45fc2f9f34bacbd
parent0f2ca5892a27b3ed3a2d373b8628bbfed56e93ac
[project @ 1999-11-29 17:34:14 by simonpj]
Make it so that a class decl generates default method decls
for every method, not just for the ones that the user supplies
default-methods for.

GHC will never call these default-default methods, because
when it finds an instance decl with no defn for a method,
*and* the class decl doesn't have a user-programmed default
method, it whips up a new default method for that instance
decl so that the error message is more informative than
the default-default method would be.

But Hugs isn't so smart, and wants to call something from
the class decl.

This change required fiddling with more than I expected.  Sigh.

Simon
15 files changed:
ghc/compiler/basicTypes/MkId.lhs
ghc/compiler/hsSyn/HsBinds.lhs
ghc/compiler/main/Main.lhs
ghc/compiler/main/MkIface.lhs
ghc/compiler/parser/RdrHsSyn.lhs
ghc/compiler/rename/Rename.lhs
ghc/compiler/rename/RnBinds.lhs
ghc/compiler/rename/RnIfaces.lhs
ghc/compiler/rename/RnMonad.lhs
ghc/compiler/rename/RnSource.lhs
ghc/compiler/typecheck/TcClassDcl.lhs
ghc/compiler/typecheck/TcInstDcls.lhs
ghc/compiler/typecheck/TcSimplify.lhs
ghc/compiler/typecheck/TcTyClsDecls.lhs
ghc/compiler/types/Class.lhs