@@ -123,7 +123,7 @@ import Control.Alternative (class Alternative)
123
123
import Control.Lazy (class Lazy , defer )
124
124
import Control.Monad.Rec.Class (class MonadRec , Step (..), tailRecM2 )
125
125
import Control.Monad.ST as ST
126
- import Data.Array.NonEmpty.Internal (NonEmptyArray )
126
+ import Data.Array.NonEmpty.Internal (NonEmptyArray (..) )
127
127
import Data.Array.ST as STA
128
128
import Data.Array.ST.Iterator as STAI
129
129
import Data.Foldable (class Foldable , foldl , foldr , traverse_ )
@@ -134,7 +134,6 @@ import Data.Traversable (sequence, traverse)
134
134
import Data.Tuple (Tuple (..), fst , snd )
135
135
import Data.Unfoldable (class Unfoldable , unfoldr )
136
136
import Partial.Unsafe (unsafePartial )
137
- import Unsafe.Coerce (unsafeCoerce )
138
137
139
138
-- | Convert an `Array` into an `Unfoldable` structure.
140
139
toUnfoldable :: forall f . Unfoldable f => Array ~> f
@@ -895,7 +894,7 @@ groupBy op xs =
895
894
_ <- STA .push x sub
896
895
STAI .pushWhile (op x) iter sub
897
896
grp <- STA .unsafeFreeze sub
898
- STA .push ((unsafeCoerce :: Array ~> NonEmptyArray ) grp) result
897
+ STA .push (NonEmptyArray grp) result
899
898
STA .unsafeFreeze result
900
899
901
900
-- | Remove the duplicates from an array, creating a new array.
0 commit comments