use runByteArrayST instead of runST
This commit is contained in:
parent
61c7539cee
commit
2e8d4279c7
1 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,8 @@ module Data.ByteArray.Builder.Bounded
|
|||
|
||||
import Arithmetic.Types (type (<=), type (:=:))
|
||||
import Control.Monad.Primitive
|
||||
import Control.Monad.ST
|
||||
import Control.Monad.ST (ST)
|
||||
import Control.Monad.ST.Run (runByteArrayST)
|
||||
import Data.Bits
|
||||
import Data.ByteArray.Builder.Bounded.Unsafe (Builder(..))
|
||||
import Data.Char (ord)
|
||||
|
@ -76,7 +77,7 @@ run ::
|
|||
-> Builder n -- ^ Builder
|
||||
-> ByteArray
|
||||
{-# inline run #-}
|
||||
run n b = runST $ do
|
||||
run n b = runByteArrayST $ do
|
||||
arr <- newByteArray (Nat.demote n)
|
||||
len <- Unsafe.pasteST b arr 0
|
||||
shrinkMutableByteArray arr len
|
||||
|
|
Loading…
Reference in a new issue