Skip to content

Commit eab0ec6

Browse files
committed
Add hints for when 'x <*> y' could be 'y'
1 parent fdf9458 commit eab0ec6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

data/hlint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,13 @@
508508
- warn: {lhs: x <* return y, rhs: x}
509509
- warn: {lhs: pure x *> y, rhs: "y", name: Redundant *>}
510510
- warn: {lhs: return x *> y, rhs: "y", name: Redundant *>}
511+
- warn: {lhs: "x <*> Nothing", rhs: "Nothing" }
512+
- warn: {lhs: "x <*> First Nothing", rhs: "First Nothing" }
513+
- warn: {lhs: "x <*> Last Nothing", rhs: "Last Nothing" }
514+
- warn: {lhs: "x <*> Left a", rhs: "Left a" }
515+
- warn: {lhs: "x <*> Ap []", rhs: "Ap []" }
516+
- warn: {lhs: "x <*> Ap mempty", rhs: "Ap mempty" }
517+
- warn: {lhs: "x <*> []", rhs: "[]" }
511518

512519
# MONAD
513520

0 commit comments

Comments
 (0)