Skip to content

Commit

Permalink
Add hint to use flip (#1616)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephcsible authored Dec 14, 2024
1 parent 4be7b9e commit 7f60084
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
- warn: {lhs: g <**> flip f, rhs: g >>= f, name: Redundant flip}
- warn: {lhs: flip f =<< g, rhs: f <*> g, name: Redundant flip}
- warn: {lhs: g >>= flip f, rhs: g Control.Applicative.<**> f, name: Redundant flip}
- warn: {lhs: ($ x) . f, rhs: flip f x}

# CHAR

Expand Down
16 changes: 16 additions & 0 deletions hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -6055,6 +6055,22 @@ g Control.Applicative.<**> f
<td>Warning</td>
</tr>
<tr>
<td>Use flip</td>
<td>
LHS:
<code>
($ x) . f
</code>
<br>
RHS:
<code>
flip f x
</code>
<br>
</td>
<td>Warning</td>
</tr>
<tr>
<td>Use isAsciiLower</td>
<td>
LHS:
Expand Down

0 comments on commit 7f60084

Please sign in to comment.