#4495: GHC fails to inline methods of single-method classes
---------------------------------+------------------------------------------
    Reporter:  diatchki          |        Owner:  igloo                  
        Type:  bug               |       Status:  new                    
    Priority:  normal            |    Milestone:  7.0.2                  
   Component:  Compiler          |      Version:  7.1                    
    Keywords:                    |     Testcase:                         
   Blockedby:                    |   Difficulty:                         
          Os:  Unknown/Multiple  |     Blocking:                         
Architecture:  Unknown/Multiple  |      Failure:  Runtime performance bug
---------------------------------+------------------------------------------
Changes (by simonpj):

  * owner:  => igloo


Comment:

 Yes, I've been meaning to get back to this. This patch fixes it
 {{{
 Tue Dec 21 16:19:11 GMT 2010  [email protected]
   * 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
 }}}
 It's not clear to me how to add a regression test.  Ian, if you can,
 please do.

 If this gets pushed into the stable branch then fine, but no special need
 to do so.

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4495#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to