Skip to content

Commit 98a2d43

Browse files
Drop deprecated group' and empty (#219)
1 parent 7f63dbe commit 98a2d43

File tree

4 files changed

+1
-17
lines changed

4 files changed

+1
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Notable changes to this project are documented in this file. The format is based
66

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

1011
New features:
1112

src/Data/Array.purs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ module Data.Array
100100
, span
101101
, group
102102
, groupAll
103-
, group'
104103
, groupBy
105104
, groupAllBy
106105

@@ -148,7 +147,6 @@ import Data.Traversable (sequence, traverse)
148147
import Data.Tuple (Tuple(..), fst, snd)
149148
import Data.Unfoldable (class Unfoldable, unfoldr)
150149
import Partial.Unsafe (unsafePartial)
151-
import Prim.TypeError (class Warn, Text)
152150

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

986-
-- | Deprecated previous name of `groupAll`.
987-
group' :: forall a. Warn (Text "'group\'' is deprecated, use 'groupAll' instead") => Ord a => Array a -> Array (NonEmptyArray a)
988-
group' = groupAll
989-
990984
-- | Group equal, consecutive elements of an array into arrays, using the
991985
-- | specified equivalence relation to determine equality.
992986
-- |

src/Data/Array/NonEmpty.purs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ module Data.Array.NonEmpty
8080
, span
8181
, group
8282
, groupAll
83-
, group'
8483
, groupBy
8584
, groupAllBy
8685

@@ -134,7 +133,6 @@ import Data.Tuple (Tuple(..))
134133
import Data.Unfoldable (class Unfoldable)
135134
import Data.Unfoldable1 (class Unfoldable1, unfoldr1)
136135
import Partial.Unsafe (unsafePartial)
137-
import Prim.TypeError (class Warn, Text)
138136
import Unsafe.Coerce (unsafeCoerce)
139137

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

427-
-- | Deprecated previous name of `groupAll`.
428-
group' :: forall a. Warn (Text "'group\'' is deprecated, use 'groupAll' instead") => Ord a => NonEmptyArray a -> NonEmptyArray (NonEmptyArray a)
429-
group' = unsafeAdapt $ A.groupAll
430-
431425
-- | Group equal, consecutive elements of an array into arrays, using the
432426
-- | specified equivalence relation to determine equality.
433427
-- |

src/Data/Array/ST.purs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module Data.Array.ST
88
, run
99
, withArray
1010
, new
11-
, empty
1211
, peek
1312
, poke
1413
, modify
@@ -34,7 +33,6 @@ import Prelude
3433
import Control.Monad.ST as ST
3534
import Control.Monad.ST (ST, Region)
3635
import Data.Maybe (Maybe(..))
37-
import Prim.TypeError (class Warn, Text)
3836

3937
-- | A reference to a mutable array.
4038
-- |
@@ -80,9 +78,6 @@ foreign import unsafeThaw :: forall h a. Array a -> ST h (STArray h a)
8078
-- | Create a new, empty mutable array.
8179
foreign import new :: forall h a. ST h (STArray h a)
8280

83-
empty :: forall h a. Warn (Text "'Data.Array.ST.empty' is deprecated, use 'Data.Array.ST.new' instead") => ST h (STArray h a)
84-
empty = new
85-
8681
-- | Create a mutable copy of an immutable array.
8782
foreign import thaw :: forall h a. Array a -> ST h (STArray h a)
8883

0 commit comments

Comments
 (0)