diff --git a/hints.md b/hints.md index da06294a..a27905f0 100644 --- a/hints.md +++ b/hints.md @@ -2167,7 +2167,7 @@ flip g `on` h Suggestion -Fuse on/on +Use on once LHS: @@ -2519,6 +2519,22 @@ a ++ b Suggestion +Use + directly + +LHS: + +sum [a, b] + +
+RHS: + +a + b + +
+ +Suggestion + + Use map once LHS: @@ -2759,7 +2775,7 @@ init x Warning -Avoid reverse +Redundant reverse LHS: @@ -5751,7 +5767,7 @@ RHS: Warning -Redundant uncurry +Redundant curry/uncurry LHS: @@ -5767,7 +5783,7 @@ f Warning -Redundant curry +Redundant curry/uncurry LHS: @@ -7675,7 +7691,7 @@ x Warning -Redundant pure +Redundant *> LHS: @@ -7691,7 +7707,7 @@ y Warning -Redundant return +Redundant *> LHS: @@ -9003,7 +9019,7 @@ m Warning -Redundant pure +Redundant *> LHS: @@ -9019,7 +9035,7 @@ m Warning -Redundant return +Redundant *> LHS: @@ -9035,7 +9051,7 @@ m Warning -Redundant pure +Redundant >> LHS: @@ -9051,7 +9067,7 @@ m Warning -Redundant return +Redundant >> LHS: @@ -10075,7 +10091,7 @@ Data.Maybe.isNothing Warning -Use Just +Redundant maybe LHS: @@ -10091,7 +10107,7 @@ RHS: Warning -Use Just +Redundant maybe LHS: @@ -10107,7 +10123,7 @@ RHS: Warning -Use Just +Redundant maybe LHS: @@ -10123,7 +10139,7 @@ RHS: Warning -Use Just +Redundant maybe LHS: @@ -10139,7 +10155,7 @@ RHS: Warning -Use Just +Redundant fromMaybe LHS: @@ -10155,7 +10171,7 @@ Just True == x Ignore -Use Just +Redundant fromMaybe LHS: @@ -11248,6 +11264,22 @@ reverse (filter f x) Warning +Move reverse out + +LHS: + +mapMaybe f (reverse x) + +
+RHS: + +reverse (mapMaybe f x) + +
+ +Warning + + Use lefts LHS: @@ -12694,7 +12726,7 @@ all (and . f) x Warning -Use any +Use any nested LHS: @@ -12710,7 +12742,7 @@ any (any f) x Warning -Use any +Use any nested LHS: @@ -12726,7 +12758,7 @@ any (any f . g) x Warning -Use all +Use all nested LHS: @@ -12742,7 +12774,7 @@ all (all f) x Warning -Use all +Use all nested LHS: @@ -12774,7 +12806,7 @@ foldMap (fold . f) x Warning -Use foldMap +Use foldMap nested LHS: @@ -13126,6 +13158,422 @@ foldr (f . g) z x Suggestion +Redundant toList + +LHS: + +fold (Data.Foldable.toList x) + +
+RHS: + +fold x + +
+ +Warning + + +Redundant toList + +LHS: + +foldMap f (Data.Foldable.toList x) + +
+RHS: + +foldMap f x + +
+ +Warning + + +Redundant toList + +LHS: + +foldMap' f (Data.Foldable.toList x) + +
+RHS: + +foldMap' f x + +
+ +Warning + + +Redundant toList + +LHS: + +foldr f z (Data.Foldable.toList x) + +
+RHS: + +foldr f z x + +
+ +Warning + + +Redundant toList + +LHS: + +foldr' f z (Data.Foldable.toList x) + +
+RHS: + +foldr' f z x + +
+ +Warning + + +Redundant toList + +LHS: + +foldl f z (Data.Foldable.toList x) + +
+RHS: + +foldl f z x + +
+ +Warning + + +Redundant toList + +LHS: + +foldl' f z (Data.Foldable.toList x) + +
+RHS: + +foldl' f z x + +
+ +Warning + + +Redundant toList + +LHS: + +foldr1 f (Data.Foldable.toList x) + +
+RHS: + +foldr1 f x + +
+ +Warning + + +Redundant toList + +LHS: + +foldl1 f (Data.Foldable.toList x) + +
+RHS: + +foldl1 f x + +
+ +Warning + + +Redundant toList + +LHS: + +null (Data.Foldable.toList x) + +
+RHS: + +null x + +
+ +Warning + + +Redundant toList + +LHS: + +length (Data.Foldable.toList x) + +
+RHS: + +length x + +
+ +Warning + + +Redundant toList + +LHS: + +elem y (Data.Foldable.toList x) + +
+RHS: + +elem y x + +
+ +Warning + + +Redundant toList + +LHS: + +notElem y (Data.Foldable.toList x) + +
+RHS: + +notElem y x + +
+ +Warning + + +Redundant toList + +LHS: + +maximum (Data.Foldable.toList x) + +
+RHS: + +maximum x + +
+ +Warning + + +Redundant toList + +LHS: + +minimum (Data.Foldable.toList x) + +
+RHS: + +minimum x + +
+ +Warning + + +Redundant toList + +LHS: + +maximumBy f (Data.Foldable.toList x) + +
+RHS: + +maximumBy f x + +
+ +Warning + + +Redundant toList + +LHS: + +minimumBy f (Data.Foldable.toList x) + +
+RHS: + +minimumBy f x + +
+ +Warning + + +Redundant toList + +LHS: + +sum (Data.Foldable.toList x) + +
+RHS: + +sum x + +
+ +Warning + + +Redundant toList + +LHS: + +product (Data.Foldable.toList x) + +
+RHS: + +product x + +
+ +Warning + + +Redundant toList + +LHS: + +and (Data.Foldable.toList x) + +
+RHS: + +and x + +
+ +Warning + + +Redundant toList + +LHS: + +or (Data.Foldable.toList x) + +
+RHS: + +or x + +
+ +Warning + + +Redundant toList + +LHS: + +all f (Data.Foldable.toList x) + +
+RHS: + +all f x + +
+ +Warning + + +Redundant toList + +LHS: + +any f (Data.Foldable.toList x) + +
+RHS: + +any f x + +
+ +Warning + + +Redundant toList + +LHS: + +find f (Data.Foldable.toList x) + +
+RHS: + +find f x + +
+ +Warning + + +Redundant toList + +LHS: + +concat (Data.Foldable.toList x) + +
+RHS: + +concat x + +
+ +Warning + + +Redundant toList + +LHS: + +concatMap f (Data.Foldable.toList x) + +
+RHS: + +concatMap f x + +
+ +Warning + + Use gets LHS: