Skip to content

Drop deprecated group' and empty #219

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 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Notable changes to this project are documented in this file. The format is based

Breaking changes:
- Migrate FFI to ES modules (#218 by @kl0tl and @JordanMartinez)
- Drop deprecated `group'` and `empty` (#219 by @JordanMartinez)

New features:

Expand Down
6 changes: 0 additions & 6 deletions src/Data/Array.purs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ module Data.Array
, span
, group
, groupAll
, group'
, groupBy
, groupAllBy

Expand Down Expand Up @@ -148,7 +147,6 @@ import Data.Traversable (sequence, traverse)
import Data.Tuple (Tuple(..), fst, snd)
import Data.Unfoldable (class Unfoldable, unfoldr)
import Partial.Unsafe (unsafePartial)
import Prim.TypeError (class Warn, Text)

-- | Convert an `Array` into an `Unfoldable` structure.
toUnfoldable :: forall f. Unfoldable f => Array ~> f
Expand Down Expand Up @@ -983,10 +981,6 @@ group xs = groupBy eq xs
groupAll :: forall a. Ord a => Array a -> Array (NonEmptyArray a)
groupAll = groupAllBy compare

-- | Deprecated previous name of `groupAll`.
group' :: forall a. Warn (Text "'group\'' is deprecated, use 'groupAll' instead") => Ord a => Array a -> Array (NonEmptyArray a)
group' = groupAll

-- | Group equal, consecutive elements of an array into arrays, using the
-- | specified equivalence relation to determine equality.
-- |
Expand Down
6 changes: 0 additions & 6 deletions src/Data/Array/NonEmpty.purs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ module Data.Array.NonEmpty
, span
, group
, groupAll
, group'
, groupBy
, groupAllBy

Expand Down Expand Up @@ -134,7 +133,6 @@ import Data.Tuple (Tuple(..))
import Data.Unfoldable (class Unfoldable)
import Data.Unfoldable1 (class Unfoldable1, unfoldr1)
import Partial.Unsafe (unsafePartial)
import Prim.TypeError (class Warn, Text)
import Unsafe.Coerce (unsafeCoerce)

-- | Internal - adapt an Array transform to NonEmptyArray
Expand Down Expand Up @@ -424,10 +422,6 @@ group = unsafeAdapt $ A.group
groupAll :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray (NonEmptyArray a)
groupAll = groupAllBy compare

-- | Deprecated previous name of `groupAll`.
group' :: forall a. Warn (Text "'group\'' is deprecated, use 'groupAll' instead") => Ord a => NonEmptyArray a -> NonEmptyArray (NonEmptyArray a)
group' = unsafeAdapt $ A.groupAll

-- | Group equal, consecutive elements of an array into arrays, using the
-- | specified equivalence relation to determine equality.
-- |
Expand Down
5 changes: 0 additions & 5 deletions src/Data/Array/ST.purs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module Data.Array.ST
, run
, withArray
, new
, empty
, peek
, poke
, modify
Expand All @@ -34,7 +33,6 @@ import Prelude
import Control.Monad.ST as ST
import Control.Monad.ST (ST, Region)
import Data.Maybe (Maybe(..))
import Prim.TypeError (class Warn, Text)

-- | A reference to a mutable array.
-- |
Expand Down Expand Up @@ -80,9 +78,6 @@ foreign import unsafeThaw :: forall h a. Array a -> ST h (STArray h a)
-- | Create a new, empty mutable array.
foreign import new :: forall h a. ST h (STArray h a)

empty :: forall h a. Warn (Text "'Data.Array.ST.empty' is deprecated, use 'Data.Array.ST.new' instead") => ST h (STArray h a)
empty = new

-- | Create a mutable copy of an immutable array.
foreign import thaw :: forall h a. Array a -> ST h (STArray h a)

Expand Down