From 46be8f385978a367f27c0c2f73629ebf8e42857e Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Mon, 22 Dec 2025 10:24:03 +0100 Subject: Add a few more GHC warnings and fix all offenders --- ops/Data/Array/Strided/Arith/Internal.hs | 2 +- ox-arrays.cabal | 2 +- src/Data/Array/Nested/Mixed/Shape.hs | 2 +- 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 00bcffc..2eb0666 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 bbfa3b5..ff35b02 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 a88ab9b..6846a8b 100644 --- a/src/Data/Array/Nested/Mixed/Shape.hs +++ b/src/Data/Array/Nested/Mixed/Shape.hs @@ -601,7 +601,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 -- cgit v1.2.3-70-g09d2