summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-11-22 15:09:46 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2014-11-22 15:14:03 +0100
commit96d29b5403bd8a6465a65a39da861f5b9610fc89 (patch)
tree7dea8b384ac4be7bb5ce29380833644330b8543a
parent41300b7687c7fc60832f5fa91fce897fc2679ccd (diff)
downloadhaskell-96d29b5403bd8a6465a65a39da861f5b9610fc89.tar.gz
Call `popCountBigNat` directly (#9818)
This calls the `popCountBigNat` primitive directly instead of going through `Integer`'s `popCount`.
-rw-r--r--libraries/base/GHC/Natural.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/GHC/Natural.hs b/libraries/base/GHC/Natural.hs
index 3adfd40d46..e9b37b1c30 100644
--- a/libraries/base/GHC/Natural.hs
+++ b/libraries/base/GHC/Natural.hs
@@ -332,7 +332,7 @@ instance Bits Natural where
rotateR = shiftR
popCount (NatS# w) = popCount (W# w)
- popCount (NatJ# bn) = popCount (Jp# bn)
+ popCount (NatJ# bn) = I# (popCountBigNat bn)
zeroBits = NatS# 0##