patch applied (ghc): Single-method classes are implemented with a newtype

Simon Peyton Jones simonpj at microsoft.com
Tue Dec 21 17:58:32 CET 2010


Tue Dec 21 08:19:11 PST 2010  simonpj at microsoft.com
  * 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.

    M ./compiler/basicTypes/MkId.lhs -7 +10
    M ./compiler/typecheck/TcInstDcls.lhs -23 +24

View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20101221161911-1287e-40608363f0443527650e72583a0d1c2f86e6d699.gz



More information about the Cvs-ghc mailing list