From cfd603d799414d6bdbce2f32e4d785d4b4aca292 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 20 Apr 2021 12:45:47 -0700 Subject: [PATCH 1/2] Fix warnings revealed by v0.14.1 PS release --- src/Data/Foldable.purs | 4 ++-- src/Data/FoldableWithIndex.purs | 2 +- test/Main.purs | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Data/Foldable.purs b/src/Data/Foldable.purs index a80f9d5..cf160ad 100644 --- a/src/Data/Foldable.purs +++ b/src/Data/Foldable.purs @@ -140,7 +140,7 @@ instance foldableMaybe :: Foldable Maybe where foldr f z (Just x) = x `f` z foldl _ z Nothing = z foldl f z (Just x) = z `f` x - foldMap f Nothing = mempty + foldMap _ Nothing = mempty foldMap f (Just x) = f x instance foldableFirst :: Foldable First where @@ -183,7 +183,7 @@ instance foldableEither :: Foldable (Either a) where foldr f z (Right x) = f x z foldl _ z (Left _) = z foldl f z (Right x) = f z x - foldMap f (Left _) = mempty + foldMap _ (Left _) = mempty foldMap f (Right x) = f x instance foldableTuple :: Foldable (Tuple a) where diff --git a/src/Data/FoldableWithIndex.purs b/src/Data/FoldableWithIndex.purs index 8bac6d3..258fe1e 100644 --- a/src/Data/FoldableWithIndex.purs +++ b/src/Data/FoldableWithIndex.purs @@ -166,7 +166,7 @@ instance foldableWithIndexEither :: FoldableWithIndex Unit (Either a) where foldrWithIndex f z (Right x) = f unit x z foldlWithIndex _ z (Left _) = z foldlWithIndex f z (Right x) = f unit z x - foldMapWithIndex f (Left _) = mempty + foldMapWithIndex _ (Left _) = mempty foldMapWithIndex f (Right x) = f unit x instance foldableWithIndexTuple :: FoldableWithIndex Unit (Tuple a) where diff --git a/test/Main.purs b/test/Main.purs index 9579f3c..e97e6d9 100644 --- a/test/Main.purs +++ b/test/Main.purs @@ -437,26 +437,26 @@ instance eqIOr :: (Eq l, Eq r) => Eq (IOr l r) where instance bifoldableIOr :: Bifoldable IOr where bifoldr l r u (Both fst snd) = l fst (r snd u) - bifoldr l r u (Fst fst) = l fst u - bifoldr l r u (Snd snd) = r snd u + bifoldr l _ u (Fst fst) = l fst u + bifoldr _ r u (Snd snd) = r snd u bifoldl l r u (Both fst snd) = r (l u fst) snd - bifoldl l r u (Fst fst) = l u fst - bifoldl l r u (Snd snd) = r u snd + bifoldl l _ u (Fst fst) = l u fst + bifoldl _ r u (Snd snd) = r u snd bifoldMap l r (Both fst snd) = l fst <> r snd - bifoldMap l r (Fst fst) = l fst - bifoldMap l r (Snd snd) = r snd + bifoldMap l _ (Fst fst) = l fst + bifoldMap _ r (Snd snd) = r snd instance bifunctorIOr :: Bifunctor IOr where bimap f g (Both fst snd) = Both (f fst) (g snd) - bimap f g (Fst fst) = Fst (f fst) - bimap f g (Snd snd) = Snd (g snd) + bimap f _ (Fst fst) = Fst (f fst) + bimap _ g (Snd snd) = Snd (g snd) instance bitraversableIOr :: Bitraversable IOr where bitraverse f g (Both fst snd) = Both <$> f fst <*> g snd - bitraverse f g (Fst fst) = Fst <$> f fst - bitraverse f g (Snd snd) = Snd <$> g snd + bitraverse f _ (Fst fst) = Fst <$> f fst + bitraverse _ g (Snd snd) = Snd <$> g snd bisequence (Both fst snd) = Both <$> fst <*> snd bisequence (Fst fst) = Fst <$> fst From e8a292632dfb22f08a299719600505077f05dae1 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 20 Apr 2021 12:46:57 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7bd311..5294844 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ New features: Bugfixes: Other improvements: +- Fix warnings revealed by v0.14.1 PS release (#135 by @JordanMartinez) ## [v5.0.0](https://github.com/purescript/purescript-foldable-traversable/releases/tag/v5.0.0) - 2021-02-26