Skip to content

Commit

Permalink
Add missing DecreasesLaziness
Browse files Browse the repository at this point in the history
The `zip/take` hint can decrease laziness too: `zip (take 0 []) (take undefined [])` is `[]`, but `take (min 0 undefined) (zip [] [])` bottoms.
  • Loading branch information
josephcsible authored Jul 18, 2020
1 parent d853362 commit 6342b8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
- warn: {lhs: zipWith f y (repeat z), rhs: map (\x -> f x z) y}
- warn: {lhs: listToMaybe (filter p x), rhs: find p x}
- warn: {lhs: zip (take n x) (take n y), rhs: take n (zip x y)}
- warn: {lhs: zip (take n x) (take m y), rhs: take (min n m) (zip x y), side: notEq n m, note: IncreasesLaziness, name: Redundant take}
- warn: {lhs: zip (take n x) (take m y), rhs: take (min n m) (zip x y), side: notEq n m, note: [IncreasesLaziness, DecreasesLaziness], name: Redundant take}

# MONOIDS

Expand Down

0 comments on commit 6342b8c

Please sign in to comment.