Skip to content

Commit f891921

Browse files
committed
Update for STArray changes
1 parent e569c25 commit f891921

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Test/QuickCheck/Arbitrary.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Control.Monad.Gen.Common as MGC
1818
import Control.Monad.ST as ST
1919
import Data.Array.NonEmpty (NonEmptyArray)
2020
import Data.Array.NonEmpty as NEA
21-
import Data.Array.ST (pushSTArray, unsafeFreeze, unsafeThaw)
21+
import Data.Array.ST as STA
2222
import Data.Char (toCharCode, fromCharCode)
2323
import Data.Either (Either(..))
2424
import Data.Foldable (foldl)
@@ -125,9 +125,9 @@ instance arbNonEmptyArray :: Arbitrary a => Arbitrary (NonEmptyArray a) where
125125
x <- arbitrary
126126
xs <- arbitrary
127127
pure $ unsafePartial fromJust $ NEA.fromArray $ ST.run do
128-
mxs <- unsafeThaw xs
129-
_ <- pushSTArray mxs x
130-
unsafeFreeze mxs
128+
mxs <- STA.unsafeThaw xs
129+
_ <- STA.push x mxs
130+
STA.unsafeFreeze mxs
131131

132132
instance coarbNonEmptyArray :: Coarbitrary a => Coarbitrary (NonEmptyArray a) where
133133
coarbitrary = coarbitrary <<< NEA.toArray

0 commit comments

Comments
 (0)