[GHC] #7014: RULES for bitwise logic and shift primops

GHC cvs-ghc at haskell.org
Wed Jun 20 10:46:59 CEST 2012


#7014: RULES for bitwise logic and shift primops
---------------------------------+------------------------------------------
    Reporter:  akio              |       Owner:                  
        Type:  feature request   |      Status:  patch           
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.4.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * difficulty:  => Unknown


Comment:

 You'd like to do more.  We'd like to constant-fold `(3# .|. 5#)`, just as
 we do arithmetic.  This can't be done with a RULE in the source file, but
 it can be done with a `BuiltinRule` defined in the GHC module
 `compiler/prelude/PrelRules`.  Would you care to try that? There are
 plenty of examples in that module to work from. Thanks!

 Simon

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



More information about the Glasgow-haskell-bugs mailing list