diff options
Diffstat (limited to 'src/Data/Array/Mixed/Internal/Arith.hs')
-rw-r--r-- | src/Data/Array/Mixed/Internal/Arith.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Data/Array/Mixed/Internal/Arith.hs b/src/Data/Array/Mixed/Internal/Arith.hs index a24efd6..734c7cd 100644 --- a/src/Data/Array/Mixed/Internal/Arith.hs +++ b/src/Data/Array/Mixed/Internal/Arith.hs @@ -99,7 +99,7 @@ stridesDense sh offsetNeg stridesNeg = -- it does, return the number of elements in this prefix. checkCover :: Int -> [(Int, Int)] -> Maybe Int checkCover block [] = Just block - checkCover block ((s, n) : pairs) = guard (s <= block) >> checkCover (max block (n * s)) pairs + checkCover block ((s, n) : pairs) = guard (s <= block) >> checkCover ((n-1) * s + block) pairs -- Given shape, offset and strides, returns new (offset, strides) such that all strides are >=0 flipReverseds :: [Int] -> Int -> [Int] -> (Int, [Int]) |