Skip to content

Commit

Permalink
#669, don't suggest replacing reverse . sort (it's quite fast)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed Apr 1, 2020
1 parent 497b672 commit 3933429
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Changelog for HLint (* = breaking change)

#669, don't suggest replacing reverse . sort (it's quite fast)
#939, reduce the span of "Redundant where" to only cover the "where"
Remove support for GHC 8.4
Remove support for _eval,
Expand Down
3 changes: 2 additions & 1 deletion data/hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
- warn: {lhs: sortBy (flip (comparing f)), rhs: sortOn (Down . f)}
- warn: {lhs: sortBy (comparing f), rhs: sortOn f, side: notEq f fst && notEq f snd}
- warn: {lhs: reverse (sortOn f x), rhs: sortOn (Data.Ord.Down . f) x, name: Avoid reverse, note: Stabilizes sort order}
- warn: {lhs: reverse (sort x), rhs: sortOn Data.Ord.Down x, name: Avoid reverse, note: Stabilizes sort order}
# This suggestion likely costs performance, see https://github.com/ndmitchell/hlint/issues/669#issuecomment-607154496
# - warn: {lhs: reverse (sort x), rhs: sortOn Data.Ord.Down x, name: Avoid reverse, note: Stabilizes sort order}
- hint: {lhs: flip (g `on` h), rhs: flip g `on` h, name: Move flip}
- hint: {lhs: (f `on` g) `on` h, rhs: f `on` (g . h), name: Fuse on/on}

Expand Down

0 comments on commit 3933429

Please sign in to comment.