Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed warning

  • Loading branch information...
commit df689480d23b83578de6d48a8f9c3cf29b19fa15 1 parent 5f2d9c5
@shachaf shachaf authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Control/Lens/Fold.hs
View
4 src/Control/Lens/Fold.hs
@@ -818,7 +818,7 @@ a ^?! l = fromMaybe (error "(^?!): empty Fold") $ getFirst (foldMapOf l (First #
-- 'firstOf' :: 'Traversal'' s a -> s -> 'Maybe' a
-- @
firstOf :: Getting (Endo (Maybe a)) s t a b -> s -> Maybe a
-firstOf l = foldrOf l (\x y -> Just x) Nothing
+firstOf l = foldrOf l (\x _ -> Just x) Nothing
{-# INLINE firstOf #-}
-- | Retrieve the 'Last' entry of a 'Fold' or 'Traversal' or retrieve 'Just' the result
@@ -832,7 +832,7 @@ firstOf l = foldrOf l (\x y -> Just x) Nothing
-- 'lastOf' :: 'Traversal'' s a -> s -> 'Maybe' a
-- @
lastOf :: Getting (Dual (Endo (Maybe a))) s t a b -> s -> Maybe a
-lastOf l = foldlOf l (\x y -> Just y) Nothing
+lastOf l = foldlOf l (\_ y -> Just y) Nothing
{-# INLINE lastOf #-}
-- |
Please sign in to comment.
Something went wrong with that request. Please try again.