Bodigrim / linear-builder

Strict Text and ByteString builder, which hides mutable buffer behind linear types and takes amortized linear time.

Home Page:https://hackage.haskell.org/package/text-builder-linear

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use unsafeThawByteArray# once available

Bodigrim opened this issue · comments

See GHC MR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9739

unsafeThawByteArray# should be used instead of unsafeCoerce#:

unsafeThaw Array ST s (MArray s)
unsafeThaw (ByteArray a) = ST $ \s#
(# s#, MutableByteArray (unsafeCoerce# a) #)