diff options
author | Simon Jakobi <simon.jakobi@gmail.com> | 2020-04-25 16:44:20 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-29 01:40:34 -0400 |
commit | f44d7ae08442ae6227db37cacc97fe0def8017c5 (patch) | |
tree | 63736402f5fa2b43b1f26e771d6de7a8afc9f011 /libraries | |
parent | 277c2f26e6966e0cfaa1ddcd297af44766f37958 (diff) | |
download | haskell-f44d7ae08442ae6227db37cacc97fe0def8017c5.tar.gz |
base: Scrap deprecation plan for Data.Monoid.{First,Last}
See the discussion on the libraries mailing list for context:
https://mail.haskell.org/pipermail/libraries/2020-April/030357.html
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Data/Monoid.hs | 20 | ||||
-rw-r--r-- | libraries/base/changelog.md | 3 |
2 files changed, 3 insertions, 20 deletions
diff --git a/libraries/base/Data/Monoid.hs b/libraries/base/Data/Monoid.hs index f8925cbfb7..479dac88f5 100644 --- a/libraries/base/Data/Monoid.hs +++ b/libraries/base/Data/Monoid.hs @@ -129,16 +129,6 @@ import Data.Semigroup.Internal -- -- >>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world")) -- Just "hello" --- --- Use of this type is discouraged. Note the following equivalence: --- --- > Data.Monoid.First x === Maybe (Data.Semigroup.First x) --- --- In addition to being equivalent in the structural sense, the two --- also have 'Monoid' instances that behave the same. This type will --- be marked deprecated in GHC 8.8, and removed in GHC 8.10. --- Users are advised to use the variant from "Data.Semigroup" and wrap --- it in 'Maybe'. newtype First a = First { getFirst :: Maybe a } deriving ( Eq -- ^ @since 2.01 , Ord -- ^ @since 2.01 @@ -168,16 +158,6 @@ instance Monoid (First a) where -- -- >>> getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world")) -- Just "world" --- --- Use of this type is discouraged. Note the following equivalence: --- --- > Data.Monoid.Last x === Maybe (Data.Semigroup.Last x) --- --- In addition to being equivalent in the structural sense, the two --- also have 'Monoid' instances that behave the same. This type will --- be marked deprecated in GHC 8.8, and removed in GHC 8.10. --- Users are advised to use the variant from "Data.Semigroup" and wrap --- it in 'Maybe'. newtype Last a = Last { getLast :: Maybe a } deriving ( Eq -- ^ @since 2.01 , Ord -- ^ @since 2.01 diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md index 3919e46431..f612d29128 100644 --- a/libraries/base/changelog.md +++ b/libraries/base/changelog.md @@ -11,6 +11,9 @@ * Add `singleton` function for `Data.List.NonEmpty`. + * The planned deprecation of `Data.Monoid.First` and `Data.Monoid.Last` + is scrapped due to difficulties with the suggested migration path. + * Add `Generic` instances to `Fingerprint`, `GiveGCStats`, `GCFlags`, `ConcFlags`, `DebugFlags`, `CCFlags`, `DoHeapProfile`, `ProfFlags`, `DoTrace`, `TraceFlags`, `TickyFlags`, `ParFlags`, `RTSFlags`, `RTSStats`, |