[GHC] #6135: Unboxed Booleans
GHC
cvs-ghc at haskell.org
Tue Apr 9 04:46:50 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 benl):
I vote for changing the existing primops to use Word#, and don't bother
supporting the existing Bool returning versions.
I think we can get away with changing the existing types because it's
trivial to update client code to use the new versions. You just need to
add (tagToEnum# (word2Int# ...)).
I vote for making the primops return Word# instead of Int#. I know that
this requires an extra word2Int# conversion when using tagToEnum#, but
there is really no reason to suggest that the result of a boolean
comparison operator might be negative! I suspect the reason tagToEnum#
currently takes an Int# is because literals like 5# are Int#.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6135#comment:31>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list