From 9abd9c73ec53250dec5783a188229712639aaa94 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 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 -- cgit v1.2.3-70-g09d2