diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-05-13 16:59:17 +0200 | 
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-05-13 16:59:17 +0200 | 
| commit | ca78d92aa55e9ba8ad179ef42515e4e7b2b8155a (patch) | |
| tree | 8311a404637693dbaec34e8ef13459e19cd20020 /ops/Data/Array/Strided/Arith | |
| parent | 0b021e8630ab78ccad076cf8357e370f4a0fcab5 (diff) | |
Apply some suggestions from hlint
Diffstat (limited to 'ops/Data/Array/Strided/Arith')
| -rw-r--r-- | ops/Data/Array/Strided/Arith/Internal.hs | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/ops/Data/Array/Strided/Arith/Internal.hs b/ops/Data/Array/Strided/Arith/Internal.hs index 4d7e1da..95e5af2 100644 --- a/ops/Data/Array/Strided/Arith/Internal.hs +++ b/ops/Data/Array/Strided/Arith/Internal.hs @@ -49,7 +49,7 @@ data Dict c where  debugShow :: forall n a. (Storable a, KnownNat n) => Array n a -> String  debugShow (Array sh strides offset vec) = -  "Array @" ++ (show (natVal (Proxy @n))) ++ " " ++ show sh ++ " " ++ show strides ++ " " ++ show offset ++ " <_*" ++ show (VS.length vec) ++ ">" +  "Array @" ++ show (natVal (Proxy @n)) ++ " " ++ show sh ++ " " ++ show strides ++ " " ++ show offset ++ " <_*" ++ show (VS.length vec) ++ ">"  -- TODO: test all the cases of this thing with various input strides @@ -174,8 +174,8 @@ unreplicateStrides (Array sh strides offset vec) =        reinsertZeros (False : zeros) (s : strides') = s : reinsertZeros zeros strides'        reinsertZeros (True : zeros) strides' = 0 : reinsertZeros zeros strides'        reinsertZeros [] [] = [] -      reinsertZeros (False : _) [] = error $ "unreplicateStrides: Internal error: reply strides too short" -      reinsertZeros [] (_:_) = error $ "unreplicateStrides: Internal error: reply strides too long" +      reinsertZeros (False : _) [] = error "unreplicateStrides: Internal error: reply strides too short" +      reinsertZeros [] (_:_) = error "unreplicateStrides: Internal error: reply strides too long"        unrepSize = product [n | (n, True) <- zip sh replDims] @@ -214,7 +214,7 @@ simplifyArray array k           if | sh' /= init (arrShape array') ->                  error $ "simplifyArray: Internal error: reply shape wrong (reply " ++ show sh' ++ ", unreplicated " ++ show (arrShape array') ++ ")"              | last (arrStrides array) == 0 -> -                error $ "simplifyArray: Internal error: reduction reply handler used while inner stride was 0" +                error "simplifyArray: Internal error: reduction reply handler used while inner stride was 0"              | otherwise ->                  arrayRevDims (init revDims) (Array (init (arrShape array)) (init (rereplicate (strides' ++ [0]))) offset' vec')) @@ -253,8 +253,8 @@ simplifyArray2 arr1@(Array sh _ _ _) arr2@(Array sh2 _ _ _) k    , let reinsertZeros (False : zeros) (s : strides') = s : reinsertZeros zeros strides'          reinsertZeros (True : zeros) strides' = 0 : reinsertZeros zeros strides'          reinsertZeros [] [] = [] -        reinsertZeros (False : _) [] = error $ "simplifyArray2: Internal error: reply strides too short" -        reinsertZeros [] (_:_) = error $ "simplifyArray2: Internal error: reply strides too long" +        reinsertZeros (False : _) [] = error "simplifyArray2: Internal error: reply strides too short" +        reinsertZeros [] (_:_) = error "simplifyArray2: Internal error: reply strides too long"    , let unrepSize = product [n | (n, True) <- zip sh replDims] @@ -272,7 +272,7 @@ simplifyArray2 arr1@(Array sh _ _ _) arr2@(Array sh2 _ _ _) k           if | sh' /= init shF ->                  error $ "simplifyArray2: Internal error: reply shape wrong (reply " ++ show sh' ++ ", unreplicated " ++ show shF ++ ")"              | last replDims -> -                error $ "simplifyArray2: Internal error: reduction reply handler used while inner dimension was unreplicated" +                error "simplifyArray2: Internal error: reduction reply handler used while inner dimension was unreplicated"              | otherwise ->                  arrayRevDims (init revDims) (Array (init sh) (reinsertZeros (init replDims) strides') offset' vec')) | 
