Skip to content

Commit 0e3eec8

Browse files
committed
Add any/map and all/map fusion hints
1 parent 8d18e62 commit 0e3eec8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Changelog for HLint (* = breaking change)
22

3+
Add any/map and all/map fusion hints
34
#837, don't warn about redundant do for BlockArguments
45
#842, fix parsing of <% operators in hlint.yaml files
56
#839, match hints inside instances

data/hlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@
154154
- warn: {lhs: concatMap id, rhs: concat}
155155
- warn: {lhs: or (map p x), rhs: any p x}
156156
- warn: {lhs: and (map p x), rhs: all p x}
157+
- warn: {lhs: any f (map g x), rhs: any (f . g) x}
158+
- warn: {lhs: all f (map g x), rhs: all (f . g) x}
157159
- warn: {lhs: "zipWith (,)", rhs: zip}
158160
- warn: {lhs: "zipWith3 (,,)", rhs: zip3}
159161
- hint: {lhs: length x == 0, rhs: null x, note: IncreasesLaziness}

0 commit comments

Comments
 (0)