unboxed-ref-0.3.0.0: Fast unboxed references for ST and IO monad
Data.STRef.Unboxed
Contents
Synopsis
data STRefU s a Source #
A mutable variable in the ST monad which can hold an instance of Prim.
Prim
newSTRefU :: Prim a => a -> ST s (STRefU s a) Source #
Build a new STRefU
STRefU
readSTRefU :: Prim a => STRefU s a -> ST s a Source #
Read the value of an STRefU
writeSTRefU :: Prim a => STRefU s a -> a -> ST s () Source #
Write a new value into an STRefU
modifySTRefU :: Prim a => STRefU s a -> (a -> a) -> ST s () Source #
Mutate the contents of an STRefU.
Unboxed reference is always strict on the value it hold.