summaryrefslogtreecommitdiff
path: root/Data/TrieMap/Rep/Instances.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Data/TrieMap/Rep/Instances.hs')
-rw-r--r--Data/TrieMap/Rep/Instances.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Data/TrieMap/Rep/Instances.hs b/Data/TrieMap/Rep/Instances.hs
index 3a7b1d7..36760fe 100644
--- a/Data/TrieMap/Rep/Instances.hs
+++ b/Data/TrieMap/Rep/Instances.hs
@@ -198,8 +198,8 @@ toList64 xs = case BS.foldl c (Words 4 0, Seq.empty) xs of
fS w x = fromIntegral w `shiftL` x
(Words 0 w, xs) `c` w8
= (Words 3 (w .|. sL w8 24), xs |> w)
- (Words (i+1) w, xs) `c` w8
- = (Words i (w .|. sL w8 (8 * i)), xs)
+ (Words i' w, xs) `c` w8
+ = let !i = i' - 1 in (Words i (w .|. sL w8 (8 * i)), xs)
sL :: Word8 -> Int -> Word32
w `sL` x = fromIntegral w `shiftL` x