File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import Control.Monad.Gen.Common as MGC
1818import Control.Monad.ST as ST
1919import Data.Array.NonEmpty (NonEmptyArray )
2020import Data.Array.NonEmpty as NEA
21- import Data.Array.ST ( pushSTArray , unsafeFreeze , unsafeThaw )
21+ import Data.Array.ST as STA
2222import Data.Char (toCharCode , fromCharCode )
2323import Data.Either (Either (..))
2424import 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
132132instance coarbNonEmptyArray :: Coarbitrary a => Coarbitrary (NonEmptyArray a ) where
133133 coarbitrary = coarbitrary <<< NEA .toArray
You can’t perform that action at this time.
0 commit comments