Skip to content

Remove deprecation warning on monomorphic fold1 #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove deprecation warning on fold1
  • Loading branch information
JordanMartinez committed Dec 30, 2020
commit 91607b64f8a7b8c9acb48fc68bf301388658467b
5 changes: 1 addition & 4 deletions src/Data/NonEmpty.purs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import Data.TraversableWithIndex (class TraversableWithIndex, traverseWithIndex)
import Data.Tuple (uncurry)
import Data.Unfoldable (class Unfoldable, unfoldr)
import Data.Unfoldable1 (class Unfoldable1)
import Prim.TypeError (class Warn, Text)

-- | A non-empty container of elements of type a.
-- |
Expand Down Expand Up @@ -70,12 +69,10 @@ singleton a = a :| empty

-- | Fold a non-empty structure, collecting results using a binary operation.
-- |
-- | Deprecated, use 'Data.Semigroup.Foldable.foldl1' instead
-- |
-- | ```purescript
-- | foldl1 (+) (1 :| [2, 3]) == 6
-- | ```
foldl1 :: forall f a. Foldable f => Warn (Text "'Data.NonEmpty.foldl1' is deprecated, use 'Data.Semigroup.Foldable.foldl1' instead") => (a -> a -> a) -> NonEmpty f a -> a
foldl1 :: forall f a. Foldable f => (a -> a -> a) -> NonEmpty f a -> a
foldl1 = Foldable1.foldl1

-- | Apply a function that takes the `first` element and remaining elements
Expand Down