Skip to content

Commit

Permalink
Remove isEmpty side condition - it always evalutes to False
Browse files Browse the repository at this point in the history
Summary:

Test Plan:
  • Loading branch information
ndmitchell committed Aug 26, 2024
1 parent effbaec commit 3c073c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1236,10 +1236,10 @@

# Data.List

- warn: {lhs: head l, rhs: "case l of x:_ -> x; [] -> error _", side: not (isNonEmpty l), name: Avoid partial function}
- warn: {lhs: last l, rhs: "case reverse l of x:_ -> x; [] -> error _", side: not (isNonEmpty l), name: Avoid partial function}
- warn: {lhs: tail l, rhs: "case l of _:xs -> xs; [] -> error _", side: not (isNonEmpty x), name: Avoid partial function}
- warn: {lhs: init l, rhs: "case reverse l of _:xs -> reverse xs; [] -> error _", side: not (isNonEmpty x), name: Avoid partial function}
- warn: {lhs: head l, rhs: "case l of x:_ -> x; [] -> error _", name: Avoid partial function}
- warn: {lhs: last l, rhs: "case reverse l of x:_ -> x; [] -> error _", name: Avoid partial function}
- warn: {lhs: tail l, rhs: "case l of _:xs -> xs; [] -> error _", name: Avoid partial function}
- warn: {lhs: init l, rhs: "case reverse l of _:xs -> reverse xs; [] -> error _", name: Avoid partial function}
- warn: {lhs: l !! n, rhs: "case drop n l of x:_ -> x; [] -> error _", name: Avoid partial function}

# Data.List.NonEmpty
Expand Down

0 comments on commit 3c073c2

Please sign in to comment.