unboxed-references-0.1.0: A library for reference cells backed by unboxed-vectors
Data.STRef.Unboxed
Contents
Description
Unboxed mutable references backed by unboxed vectors.
newtype STRefU s a Source #
An unboxed mutable variable that can hold any type which is an instance of Unbox. This is backed by a length one unboxed mutable vector.
Unbox
Constructors
Fields
newSTRefU :: Unbox a => a -> ST s (STRefU s a) Source #
Create a new STRefU containing the given value.
STRefU
readSTRefU :: Unbox a => STRefU s a -> ST s a Source #
Read the value in a reference cell.
writeSTRefU :: Unbox a => STRefU s a -> a -> ST s () Source #
Write a value to a reference cell.
modifySTRefU :: Unbox a => STRefU s a -> (a -> a) -> ST s () Source #
Modify the value in a reference cell. This is strict in its argument.