[GHC] #7287: Primops in RULES generate warnings

GHC cvs-ghc at haskell.org
Tue Oct 2 00:00:11 CEST 2012


#7287: Primops in RULES generate warnings
-----------------------------------------------+----------------------------
 Reporter:  rl                                 |          Owner:                  
     Type:  bug                                |         Status:  new             
 Priority:  normal                             |      Component:  Compiler        
  Version:  7.7                                |       Keywords:                  
       Os:  Unknown/Multiple                   |   Architecture:  Unknown/Multiple
  Failure:  Incorrect warning at compile-time  |       Testcase:                  
Blockedby:                                     |       Blocking:                  
  Related:                                     |  
-----------------------------------------------+----------------------------
 {{{
 import GHC.Prim

 {-# RULES

 "int2Word#/word2Int#" forall x. int2Word# (word2Int# x) = x

  #-}
 }}}

 produces the following warning:

 {{{
     Rule "int2Word#/word2Int#" may never fire
       because `int2Word#' might inline first
     Probable fix: add an INLINE[n] or NOINLINE[n] pragma on `int2Word#'
 }}}

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



More information about the Glasgow-haskell-bugs mailing list