Fix Trac #1061: refactor handling of default methods
authorsimonpj@microsoft.com <unknown>
Wed, 21 May 2008 13:00:28 +0000 (13:00 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 21 May 2008 13:00:28 +0000 (13:00 +0000)
commit24f3ffdaa0ffd164616969080c3e6400f04980dd
tree7d4bcce26d0da7ea7dc51dbe0e0b38caa45082b4
parent08ffc9074d79fd8117a090024068936a04360a17
Fix Trac #1061: refactor handling of default methods

In an instance declaration, omitted methods get a definition that
uses the default method.  We used to generate source code and feed it
to the type checker.  But tc199 shows that is a bad idea -- see
Note [Default methods in instances] in TcClassDcl.

So this patch refactors to insteadl all us to generate the
*post* typechecked code directly for default methods.
compiler/typecheck/TcClassDcl.lhs
compiler/typecheck/TcInstDcls.lhs