[GHC] #7374: rule not firing

GHC cvs-ghc at haskell.org
Tue Oct 30 09:15:15 CET 2012


#7374: rule not firing
---------------------------------+------------------------------------------
    Reporter:  igloo             |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:  7.8.1           
   Component:  Compiler          |     Version:  7.6.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj):

 The rule doesn't fire for the usual reason: `(==)` lacks a `NOINLINE [1]`
 pragma (or suchlike) and as a result it inlines before the rule has a
 chance to fire.

 This is a bit of a problem with all library-defined operations, where it
 hard to go back and add a `NOINLINE` pragma.

 Would be be possible to use an intermediate function here, like this
 {{{
 (===) = (==)
 {-# INLINE [1] (===) #-}
 }}}
 and now the rule can mention `(===)`?

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



More information about the Glasgow-haskell-bugs mailing list