diff --git a/.hlint.yaml b/.hlint.yaml index 011dc9d..eb934c7 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -189,6 +189,10 @@ - warn: lhs: "getAlt . foldMap (Alt . f)" rhs: asumMap +- hint: + lhs: "foldr (:) []" + note: "Use 'toList'" + rhs: toList - hint: lhs: "foldr (\\x acc -> f x <|> acc) empty" note: "Use 'asumMap'" diff --git a/hlint/hlint.dhall b/hlint/hlint.dhall index 4e1483b..9715377 100644 --- a/hlint/hlint.dhall +++ b/hlint/hlint.dhall @@ -97,6 +97,7 @@ in [ Rule.Arguments { arguments = , warnSimple "getAlt (foldMap (Alt . f) xs)" "asumMap xs" , warnSimple "getAlt . foldMap (Alt . f)" "asumMap" + , hintNote "foldr (:) []" "toList" "Use 'toList'" , hintNote "foldr (\\x acc -> f x <|> acc) empty" "asumMap f" "Use 'asumMap'" , hintNote "asum (map f xs)" "asumMap f xs" "Use 'asumMap'"