summaryrefslogtreecommitdiff
path: root/libraries/base
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base')
-rw-r--r--libraries/base/Data/List/NonEmpty.hs2
-rw-r--r--libraries/base/changelog.md3
2 files changed, 5 insertions, 0 deletions
diff --git a/libraries/base/Data/List/NonEmpty.hs b/libraries/base/Data/List/NonEmpty.hs
index 2f9f868b43..9a9de018dd 100644
--- a/libraries/base/Data/List/NonEmpty.hs
+++ b/libraries/base/Data/List/NonEmpty.hs
@@ -180,6 +180,8 @@ unfold :: (a -> (b, Maybe a)) -> a -> NonEmpty b
unfold f a = case f a of
(b, Nothing) -> b :| []
(b, Just c) -> b <| unfold f c
+{-# DEPRECATED unfold "Use unfoldr" #-}
+-- Deprecated in 8.2.1, remove in 8.4
-- | 'nonEmpty' efficiently turns a normal list into a 'NonEmpty' stream,
-- producing 'Nothing' if the input is empty.
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index 854a9b81ed..e2e276a4c9 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -89,6 +89,9 @@
* `mkTyCon3` is no longer exported by `Data.Typeable`. This function is
replaced by `Type.Reflection.Unsafe.mkTyCon`.
+ * `Data.List.NonEmpty.unfold` has been deprecated in favor of `unfoldr`,
+ which is functionally equivalent.
+
## 4.9.0.0 *May 2016*
* Bundled with GHC 8.0