| Copyright | (c) Dong Han 2017~2019 | 
|---|---|
| License | BSD-style | 
| Maintainer | winterland1989@gmail.com | 
| Stability | experimental | 
| Portability | portable | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
Std.Data.PrimSTRef
Contents
Description
This module provide fast unboxed references for ST monad. Unboxed reference is implemented using single cell MutableByteArray s to eliminate indirection overhead which MutVar# s a carry, on the otherhand unboxed reference only support limited type(instances of Prim class).
Synopsis
- data PrimSTRef s a
 - newPrimSTRef :: Prim a => a -> ST s (PrimSTRef s a)
 - readPrimSTRef :: Prim a => PrimSTRef s a -> ST s a
 - writePrimSTRef :: Prim a => PrimSTRef s a -> a -> ST s ()
 - modifyPrimSTRef :: Prim a => PrimSTRef s a -> (a -> a) -> ST s ()