File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1159,14 +1159,14 @@ data Place a = Place {-# UNPACK #-} !Int a
1159
1159
lookupTree :: Sized a => Int -> FingerTree a -> Place a
1160
1160
lookupTree _ Empty = error " lookupTree of empty tree"
1161
1161
lookupTree i (Single x) = Place i x
1162
- lookupTree i (Deep _ pr m sf)
1162
+ lookupTree i (Deep totalSize pr m sf)
1163
1163
| i < spr = lookupDigit i pr
1164
1164
| i < spm = case lookupTree (i - spr) m of
1165
1165
Place i' xs -> lookupNode i' xs
1166
1166
| otherwise = lookupDigit (i - spm) sf
1167
1167
where
1168
1168
spr = size pr
1169
- spm = spr + size m
1169
+ spm = totalSize - size sf
1170
1170
1171
1171
{-# SPECIALIZE lookupNode :: Int -> Node (Elem a) -> Place (Elem a) #-}
1172
1172
{-# SPECIALIZE lookupNode :: Int -> Node (Node a) -> Place (Node a) #-}
You can’t perform that action at this time.
0 commit comments