#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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to