diff --git a/.github/workflows/HLint.yml b/.github/workflows/HLint.yml index d4dec4e34..8474fe1cd 100644 --- a/.github/workflows/HLint.yml +++ b/.github/workflows/HLint.yml @@ -14,12 +14,12 @@ jobs: - uses: actions/checkout@v3 - name: 'Installing' - uses: rwe/actions-hlint-setup@v1 + uses: haskell/actions/hlint-setup@v2 with: - version: '3.3.1' + version: '3.5' - name: 'Checking code' - uses: rwe/actions-hlint-run@v2 + uses: haskell/actions/hlint-run@v2 with: path: . fail-on: warning diff --git a/src/Nix/Json.hs b/src/Nix/Json.hs index 0f75181df..e46c07e52 100644 --- a/src/Nix/Json.hs +++ b/src/Nix/Json.hs @@ -25,8 +25,8 @@ toEncodingSorted :: A.Value -> A.Encoding toEncodingSorted = \case A.Object m -> A.pairs - . fold - . ((\(k, v) -> A.pair k $ toEncodingSorted v) <$>) + . foldMap + (\(k, v) -> A.pair k $ toEncodingSorted v) . sortWith fst $ #if MIN_VERSION_aeson(2,0,0) AKM.toList diff --git a/src/Nix/String.hs b/src/Nix/String.hs index d1abf8073..8344a0bc0 100644 --- a/src/Nix/String.hs +++ b/src/Nix/String.hs @@ -211,8 +211,8 @@ toNixLikeContext stringContext = stringContext where fun :: (StringContext -> AttrSet NixLikeContextValue -> AttrSet NixLikeContextValue) - fun sc hm = - uncurry (M.insertWith (<>)) (swap $ toNixLikeContextValue sc) hm + fun sc = + uncurry (M.insertWith (<>)) (swap $ toNixLikeContextValue sc) -- | Add 'StringContext's into the resulting set. addStringContext diff --git a/tests/EvalTests.hs b/tests/EvalTests.hs index 462472495..cde6325d4 100644 --- a/tests/EvalTests.hs +++ b/tests/EvalTests.hs @@ -662,7 +662,7 @@ sameFreeVars a xs = assertEqual mempty (S.fromList xs) free' maskedFiles :: [Path] -maskedFiles = [] +maskedFiles = mempty testDir :: Path testDir = "tests/eval-compare"