Skip to content

Commit e52e981

Browse files
Fix warnings revealed by v0.14.1 PS release (#135)
* Fix warnings revealed by v0.14.1 PS release * Update changelog
1 parent f45f03a commit e52e981

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ New features:
1111
Bugfixes:
1212

1313
Other improvements:
14+
- Fix warnings revealed by v0.14.1 PS release (#135 by @JordanMartinez)
1415

1516
## [v5.0.0](https://github.com/purescript/purescript-foldable-traversable/releases/tag/v5.0.0) - 2021-02-26
1617

src/Data/Foldable.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ instance foldableMaybe :: Foldable Maybe where
140140
foldr f z (Just x) = x `f` z
141141
foldl _ z Nothing = z
142142
foldl f z (Just x) = z `f` x
143-
foldMap f Nothing = mempty
143+
foldMap _ Nothing = mempty
144144
foldMap f (Just x) = f x
145145

146146
instance foldableFirst :: Foldable First where
@@ -183,7 +183,7 @@ instance foldableEither :: Foldable (Either a) where
183183
foldr f z (Right x) = f x z
184184
foldl _ z (Left _) = z
185185
foldl f z (Right x) = f z x
186-
foldMap f (Left _) = mempty
186+
foldMap _ (Left _) = mempty
187187
foldMap f (Right x) = f x
188188

189189
instance foldableTuple :: Foldable (Tuple a) where

src/Data/FoldableWithIndex.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ instance foldableWithIndexEither :: FoldableWithIndex Unit (Either a) where
166166
foldrWithIndex f z (Right x) = f unit x z
167167
foldlWithIndex _ z (Left _) = z
168168
foldlWithIndex f z (Right x) = f unit z x
169-
foldMapWithIndex f (Left _) = mempty
169+
foldMapWithIndex _ (Left _) = mempty
170170
foldMapWithIndex f (Right x) = f unit x
171171

172172
instance foldableWithIndexTuple :: FoldableWithIndex Unit (Tuple a) where

test/Main.purs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -437,26 +437,26 @@ instance eqIOr :: (Eq l, Eq r) => Eq (IOr l r) where
437437

438438
instance bifoldableIOr :: Bifoldable IOr where
439439
bifoldr l r u (Both fst snd) = l fst (r snd u)
440-
bifoldr l r u (Fst fst) = l fst u
441-
bifoldr l r u (Snd snd) = r snd u
440+
bifoldr l _ u (Fst fst) = l fst u
441+
bifoldr _ r u (Snd snd) = r snd u
442442

443443
bifoldl l r u (Both fst snd) = r (l u fst) snd
444-
bifoldl l r u (Fst fst) = l u fst
445-
bifoldl l r u (Snd snd) = r u snd
444+
bifoldl l _ u (Fst fst) = l u fst
445+
bifoldl _ r u (Snd snd) = r u snd
446446

447447
bifoldMap l r (Both fst snd) = l fst <> r snd
448-
bifoldMap l r (Fst fst) = l fst
449-
bifoldMap l r (Snd snd) = r snd
448+
bifoldMap l _ (Fst fst) = l fst
449+
bifoldMap _ r (Snd snd) = r snd
450450

451451
instance bifunctorIOr :: Bifunctor IOr where
452452
bimap f g (Both fst snd) = Both (f fst) (g snd)
453-
bimap f g (Fst fst) = Fst (f fst)
454-
bimap f g (Snd snd) = Snd (g snd)
453+
bimap f _ (Fst fst) = Fst (f fst)
454+
bimap _ g (Snd snd) = Snd (g snd)
455455

456456
instance bitraversableIOr :: Bitraversable IOr where
457457
bitraverse f g (Both fst snd) = Both <$> f fst <*> g snd
458-
bitraverse f g (Fst fst) = Fst <$> f fst
459-
bitraverse f g (Snd snd) = Snd <$> g snd
458+
bitraverse f _ (Fst fst) = Fst <$> f fst
459+
bitraverse _ g (Snd snd) = Snd <$> g snd
460460

461461
bisequence (Both fst snd) = Both <$> fst <*> snd
462462
bisequence (Fst fst) = Fst <$> fst

0 commit comments

Comments
 (0)