Skip to content

Commit aa0d4ee

Browse files
authored
Merge pull request #6240 from commercialhaskell/hlint
Update HLint application
2 parents 3d42399 + 0c6a7d0 commit aa0d4ee

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ jobs:
2222
- name: Set up HLint
2323
uses: haskell/actions/hlint-setup@v2
2424
with:
25-
version: "3.5"
25+
version: "3.6.1"
2626
- name: Apply HLint
2727
run: |
2828
set -ex
29+
hlint app/
2930
hlint src/
3031
hlint --hint=.hlint-test.yaml tests/unit
32+
hlint --hint=.hlint-test.yaml tests/integration

.hlint-test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- OverloadedStrings
1414
- QuasiQuotes
1515
- RecordWildCards
16+
- Safe
1617
- ScopedTypeVariables
1718
- TemplateHaskell
1819
- ViewPatterns

src/Stack/Exec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ execCmd ExecOpts {..} =
138138
getRunCmd args = do
139139
packages <- view $ buildConfigL.to (smwProject . bcSMWanted)
140140
pkgComponents <- for (Map.elems packages) ppComponents
141-
let executables = filter isCExe $ concatMap Set.toList pkgComponents
141+
let executables = concatMap (filter isCExe . Set.toList) pkgComponents
142142
let (exe, args') = case args of
143143
[] -> (firstExe, args)
144144
x:xs -> case L.find (\y -> y == CExe (T.pack x)) executables of

src/Stack/Options/Completion.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ targetCompleter :: Completer
6464
targetCompleter = buildConfigCompleter $ \input -> do
6565
packages <- view $ buildConfigL.to (smwProject . bcSMWanted)
6666
comps <- for packages ppComponents
67-
pure
68-
$ filter (input `isPrefixOf`)
69-
$ concatMap allComponentNames
70-
$ Map.toList comps
67+
pure $
68+
concatMap
69+
(filter (input `isPrefixOf`) . allComponentNames)
70+
(Map.toList comps)
7171
where
7272
allComponentNames (name, comps) =
7373
map (T.unpack . renderPkgComponent . (name,)) (Set.toList comps)

0 commit comments

Comments
 (0)