packages feed

run-st 0.1.3.1 → 0.1.3.2

raw patch · 3 files changed

+8/−4 lines, 3 filesdep ~primitive-unlifted

Dependency ranges changed: primitive-unlifted

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for run-st +## 0.1.3.2 -- 2024-06-28++* Make type signature of `runUnliftedArrayST` more flexible.+ ## 0.1.3.1 -- 2023-06-27  * Depend on newer version of primitive-unlifted.
run-st.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: run-st-version: 0.1.3.1+version: 0.1.3.2 synopsis: runST without boxing penalty description:   This package provides specializations of `runST` that avoid a needless@@ -23,7 +23,7 @@   build-depends:     , base >=4.12 && <5     , primitive >=0.7 && <0.10-    , primitive-unlifted >=0.1.1 && <2.1+    , primitive-unlifted >=2.1   hs-source-dirs: src   default-language: Haskell2010   ghc-options: -O2 -Wall
src/Control/Monad/ST/Run.hs view
@@ -41,7 +41,7 @@ import Data.Primitive.ByteArray (ByteArray(ByteArray)) import Data.Primitive.PrimArray (PrimArray(PrimArray)) import Data.Primitive.SmallArray (SmallArray(SmallArray))-import Data.Primitive.Unlifted.Array (UnliftedArray,UnliftedArray_(UnliftedArray))+import Data.Primitive.Unlifted.Array (UnliftedArray_(UnliftedArray)) import GHC.Exts (Char(C#),Int(I#),Word(W#),runRW#) import GHC.Exts (Double(D#),Float(F#)) import GHC.Int (Int8(I8#),Int16(I16#),Int32(I32#))@@ -64,7 +64,7 @@ {-# inline runPrimArrayST #-} runPrimArrayST f = PrimArray (runRW# (\s0 -> case f of { ST g -> case g s0 of { (# _, PrimArray r #) -> r }})) -runUnliftedArrayST :: (forall s. ST s (UnliftedArray a)) -> UnliftedArray a+runUnliftedArrayST :: (forall s. ST s (UnliftedArray_ unlifted_a a)) -> UnliftedArray_ unlifted_a a {-# inline runUnliftedArrayST #-} runUnliftedArrayST f = UnliftedArray (runRW# (\s0 -> case f of { ST g -> case g s0 of { (# _, UnliftedArray r #) -> r }}))