Skip to content

Commit ab933d2

Browse files
Fix UnusedName warnings revealed by v0.14.1 PS release (#22)
1 parent a6495ee commit ab933d2

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
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 UnusedName warnings revealed by v0.14.1 PS release (#22 by @JordanMartinez)
1415

1516
## [v4.0.0](https://github.com/purescript/purescript-filterable/releases/tag/v4.0.0) - 2021-03-07
1617

src/Data/Filterable.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ instance filterableArray :: Filterable Array where
157157
filter = Array.filter
158158

159159
instance filterableMaybe :: Filterable Maybe where
160-
partitionMap p Nothing = { left: Nothing, right: Nothing }
160+
partitionMap _ Nothing = { left: Nothing, right: Nothing }
161161
partitionMap p (Just x) = case p x of
162162
Left a -> { left: Just a, right: Nothing }
163163
Right b -> { left: Nothing, right: Just b }
@@ -169,14 +169,14 @@ instance filterableMaybe :: Filterable Maybe where
169169
filter p = filterDefault p
170170

171171
instance filterableEither :: Monoid m => Filterable (Either m) where
172-
partitionMap p (Left x) = { left: Left x, right: Left x }
172+
partitionMap _ (Left x) = { left: Left x, right: Left x }
173173
partitionMap p (Right x) = case p x of
174174
Left a -> { left: Right a, right: Left mempty }
175175
Right b -> { left: Left mempty, right: Right b }
176176

177177
partition p = partitionDefault p
178178

179-
filterMap p (Left l) = Left l
179+
filterMap _ (Left l) = Left l
180180
filterMap p (Right r) = case p r of
181181
Nothing -> Left mempty
182182
Just x -> Right x

src/Data/Witherable.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,21 @@ instance witherableMap :: Ord k => Witherable (Map.Map k) where
142142
) <$> acc <*> p x
143143

144144
instance witherableMaybe :: Witherable Maybe where
145-
wilt p Nothing = pure { left: Nothing, right: Nothing }
145+
wilt _ Nothing = pure { left: Nothing, right: Nothing }
146146
wilt p (Just x) = map convert (p x) where
147147
convert (Left l) = { left: Just l, right: Nothing }
148148
convert (Right r) = { left: Nothing, right: Just r }
149149

150-
wither p Nothing = pure Nothing
150+
wither _ Nothing = pure Nothing
151151
wither p (Just x) = p x
152152

153153
instance witherableEither :: Monoid m => Witherable (Either m) where
154-
wilt p (Left el) = pure { left: Left el, right: Left el }
154+
wilt _ (Left el) = pure { left: Left el, right: Left el }
155155
wilt p (Right er) = map convert (p er) where
156156
convert (Left l) = { left: Right l, right: Left mempty }
157157
convert (Right r) = { left: Left mempty, right: Right r }
158158

159-
wither p (Left el) = pure (Left el)
159+
wither _ (Left el) = pure (Left el)
160160
wither p (Right er) = map convert (p er) where
161161
convert Nothing = Left mempty
162162
convert (Just r) = Right r

0 commit comments

Comments
 (0)