aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikolaj Konarski <mikolaj.konarski@funktory.com>2025-12-22 10:24:03 +0100
committerMikolaj Konarski <mikolaj.konarski@funktory.com>2025-12-22 10:24:03 +0100
commit9abd9c73ec53250dec5783a188229712639aaa94 (patch)
tree7ef44557b9e48f90125152710786a778f0e29b94
parent126a22c5b453d5830d2a5389b55662eb84a835f6 (diff)
Add a few more GHC warnings and fix all offenders
-rw-r--r--ops/Data/Array/Strided/Arith/Internal.hs2
-rw-r--r--ox-arrays.cabal2
-rw-r--r--src/Data/Array/Nested/Mixed/Shape.hs2
3 files changed, 3 insertions, 3 deletions
diff --git a/ops/Data/Array/Strided/Arith/Internal.hs b/ops/Data/Array/Strided/Arith/Internal.hs
index a99b913..6aa111a 100644
--- a/ops/Data/Array/Strided/Arith/Internal.hs
+++ b/ops/Data/Array/Strided/Arith/Internal.hs
@@ -200,7 +200,7 @@ simplifyArray :: Array n a
-> r)
-> r
simplifyArray array k
- | let revDims = map (<0) (arrStrides array)
+ | let revDims = map (< 0) (arrStrides array)
, Unreplicated array' unrepSize rereplicate <- unreplicateStrides (arrayRevDims revDims array)
= k array'
unrepSize
diff --git a/ox-arrays.cabal b/ox-arrays.cabal
index 60e1261..59335f6 100644
--- a/ox-arrays.cabal
+++ b/ox-arrays.cabal
@@ -57,7 +57,7 @@ flag default-show-instances
common basics
default-language: Haskell2010
- ghc-options: -Wall -Wcompat -Widentities -Wunused-packages
+ ghc-options: -Wall -Wcompat -Widentities -Wunused-packages -Wpartial-fields -Wredundant-bang-patterns -Woperator-whitespace -Wredundant-strictness-flags
if impl(ghc >= 9.14)
ghc-options: -Wno-pattern-namespace-specifier
diff --git a/src/Data/Array/Nested/Mixed/Shape.hs b/src/Data/Array/Nested/Mixed/Shape.hs
index a69f4bb..de1c770 100644
--- a/src/Data/Array/Nested/Mixed/Shape.hs
+++ b/src/Data/Array/Nested/Mixed/Shape.hs
@@ -725,7 +725,7 @@ ssxReplicate (SS (n :: SNat n'))
ssxIotaFrom :: StaticShX sh -> Int -> [Int]
ssxIotaFrom ZKX _ = []
-ssxIotaFrom (_ :!% ssh) i = i : ssxIotaFrom ssh (i+1)
+ssxIotaFrom (_ :!% ssh) i = i : ssxIotaFrom ssh (i + 1)
ssxFromShX :: ShX sh i -> StaticShX sh
ssxFromShX ZSX = ZKX