[GHC] #6135: Unboxed Booleans

GHC cvs-ghc at haskell.org
Thu Apr 11 13:12:53 CEST 2013


#6135: Unboxed Booleans
---------------------------------+------------------------------------------
    Reporter:  benl              |       Owner:  jstolarek       
        Type:  feature request   |      Status:  patch           
    Priority:  normal            |   Milestone:  7.8.1           
   Component:  Compiler          |     Version:  7.4.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:  #605              |  
---------------------------------+------------------------------------------

Comment(by jstolarek):

 there is really no reason to suggest that the result of a boolean
 comparison operator might be negative!

 There's a bit of inconsistency here anyway, because `dataToTag#` and
 `tagToEnum#` return an `Int#`, thus suggesting that we can have negative
 enumerations.

 I changed the primops to return `Word#`, which - as expected - breaks a
 lot of code in boot libraries. I'm adding wrappers to avoid putting
 `(tagToEnum# (word2Int# ...))` everywhere. Are there any preferences
 regarding the names of these wrappers? I decided to use the name of the
 primop with the word "Bool" before #. This looks nice for `gtCharBool#` or
 `neFloatBool#`, but not so good for `>=Bool#` and `<Bool##`. Does anyone
 have a better idea for wrapper names?

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



More information about the ghc-tickets mailing list