Single-method classes are implemented with a newtype
authorsimonpj@microsoft.com <unknown>
Tue, 21 Dec 2010 16:19:11 +0000 (16:19 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 21 Dec 2010 16:19:11 +0000 (16:19 +0000)
commit3d16d9d805e321c58459d0b62223591c19013060
tree27592a109b76379865204870fba314be359a84f6
parentd93785d99261a433075dcbac8c388730a4dec64f
Single-method classes are implemented with a newtype

This patch changes things so that such classes rely on the coercion
mechanism for inlining (since the constructor is really just a cast)
rather than on the dfun mechanism, therby removing some needless
runtime indirections.
compiler/basicTypes/MkId.lhs
compiler/typecheck/TcInstDcls.lhs