From d3ceb50cb1a8e404a15ffbf6cf628b6575c28938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janis=20Voigtl=C3=A4nder?= Date: Sun, 3 Nov 2024 21:38:43 +0100 Subject: [PATCH] more hints about eliminating Data.Foldable.toList --- data/hlint.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/hlint.yaml b/data/hlint.yaml index ed118e4f..75655bf6 100644 --- a/data/hlint.yaml +++ b/data/hlint.yaml @@ -936,6 +936,16 @@ - warn: {lhs: find f (Data.Foldable.toList x), rhs: find f x} - warn: {lhs: concat (Data.Foldable.toList x), rhs: concat x} - warn: {lhs: concatMap f (Data.Foldable.toList x), rhs: concatMap f x} + - warn: {lhs: foldrM f c (Data.Foldable.toList x), rhs: foldrM f c x} + - warn: {lhs: foldlM f c (Data.Foldable.toList x), rhs: foldlM f c x} + - warn: {lhs: traverse_ f (Data.Foldable.toList x), rhs: traverse_ f x} + - warn: {lhs: for_ (Data.Foldable.toList x) f, rhs: for_ x f} + - warn: {lhs: sequenceA_ (Data.Foldable.toList x), rhs: sequenceA_ x} + - warn: {lhs: asum (Data.Foldable.toList x), rhs: asum x} + - warn: {lhs: mapM_ f (Data.Foldable.toList x), rhs: mapM_ f x} + - warn: {lhs: forM_ (Data.Foldable.toList x) f, rhs: forM_ x f} + - warn: {lhs: sequence_ (Data.Foldable.toList x), rhs: sequence_ x} + - warn: {lhs: msum (Data.Foldable.toList x), rhs: msum x} # STATE MONAD