stdio-0.1.0.0: A simple and high performance IO toolkit for Haskell

Copyright(c) Dong Han 2017~2019
LicenseBSD-style
Maintainerwinterland1989@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Std.Data.PrimSTRef.Base

Contents

Description

Internal module for PrimSTRef and PrimIORef.

Synopsis

Unboxed ST references

newtype PrimSTRef s a Source #

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

Constructors

PrimSTRef (MutableByteArray s) 

newPrimSTRef :: Prim a => a -> ST s (PrimSTRef s a) Source #

Build a new PrimSTRef

readPrimSTRef :: Prim a => PrimSTRef s a -> ST s a Source #

Read the value of an PrimSTRef

writePrimSTRef :: Prim a => PrimSTRef s a -> a -> ST s () Source #

Write a new value into an PrimSTRef

modifyPrimSTRef :: Prim a => PrimSTRef s a -> (a -> a) -> ST s () Source #

Mutate the contents of an PrimSTRef.

Unboxed reference is always strict on the value it hold.