Skip to content

Commit 8f5a4d7

Browse files
Remove deprecation warning on monomorphic fold1 (#45)
* Remove deprecation warning on fold1 * Add changelog entry
1 parent b9f4158 commit 8f5a4d7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

CHANGELOG.md

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

1414
Other improvements:
15+
- Drop deprecation warning on `fold1` (#45 by @JordanMartinez)
1516

1617
## [v6.1.0](https://github.com/purescript/purescript-nonempty/releases/tag/v6.0.0) - 2021-10-21
1718

src/Data/NonEmpty.purs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import Data.TraversableWithIndex (class TraversableWithIndex, traverseWithIndex)
2929
import Data.Tuple (uncurry)
3030
import Data.Unfoldable (class Unfoldable, unfoldr)
3131
import Data.Unfoldable1 (class Unfoldable1)
32-
import Prim.TypeError (class Warn, Text)
3332

3433
-- | A non-empty container of elements of type a.
3534
-- |
@@ -70,12 +69,10 @@ singleton a = a :| empty
7069

7170
-- | Fold a non-empty structure, collecting results using a binary operation.
7271
-- |
73-
-- | Deprecated, use 'Data.Semigroup.Foldable.foldl1' instead
74-
-- |
7572
-- | ```purescript
7673
-- | foldl1 (+) (1 :| [2, 3]) == 6
7774
-- | ```
78-
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
75+
foldl1 :: forall f a. Foldable f => (a -> a -> a) -> NonEmpty f a -> a
7976
foldl1 = Foldable1.foldl1
8077

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

0 commit comments

Comments
 (0)