ord-stref-0.1.0.0: Orderable STRefs and unique symbol generation in ST.

Copyright(c) 2019 L.S.Leary
LicenseBSD3
Safe HaskellNone
LanguageHaskell2010

Data.OSTRef

Description

A drop-in replacement for Data.STRef, extending its interface with Ord. Uses ST from Control.Monad.UST.

Documentation

data STRef s a Source #

Instances
Eq (STRef s a) Source # 
Instance details

Defined in Data.OSTRef

Methods

(==) :: STRef s a -> STRef s a -> Bool #

(/=) :: STRef s a -> STRef s a -> Bool #

Ord (STRef s a) Source #

Arbitrary, but internally consistent wrt a given state thread.

Instance details

Defined in Data.OSTRef

Methods

compare :: STRef s a -> STRef s a -> Ordering #

(<) :: STRef s a -> STRef s a -> Bool #

(<=) :: STRef s a -> STRef s a -> Bool #

(>) :: STRef s a -> STRef s a -> Bool #

(>=) :: STRef s a -> STRef s a -> Bool #

max :: STRef s a -> STRef s a -> STRef s a #

min :: STRef s a -> STRef s a -> STRef s a #

newSTRef :: a -> ST s (STRef s a) Source #

readSTRef :: STRef s a -> ST s a Source #

writeSTRef :: STRef s a -> a -> ST s () Source #

modifySTRef :: STRef s a -> (a -> a) -> ST s () Source #

modifySTRef' :: STRef s a -> (a -> a) -> ST s () Source #