unboxed-ref-0.4.0.0: Fast unboxed references for ST and IO monad

Safe HaskellNone
LanguageHaskell2010

Data.STRef.Unboxed

Contents

Synopsis

Unboxed ST references

data STRefU s a #

A mutable variable in the ST monad which can hold an instance of Prim.

newSTRefU :: Prim a => a -> ST s (STRefU s a) #

Build a new STRefU

readSTRefU :: Prim a => STRefU s a -> ST s a #

Read the value of an STRefU

writeSTRefU :: Prim a => STRefU s a -> a -> ST s () #

Write a new value into an STRefU

modifySTRefU :: Prim a => STRefU s a -> (a -> a) -> ST s () #

Mutate the contents of an STRefU.

Unboxed reference is always strict on the value it hold.