unboxed-references-0.1.0: A library for reference cells backed by unboxed-vectors

Safe HaskellNone
LanguageHaskell2010

Data.STRef.Unboxed

Contents

Description

Unboxed mutable references backed by unboxed vectors.

Synopsis

Unboxed ST References

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.

Constructors

STRefU 

Fields

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

Create a new STRefU containing the given value.

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.