module Data.Ref.LazyST (
STRef,
newSTRef,
readSTRef,
writeSTRef,
modifySTRef,
ST.STURef,
newSTURef,
readSTURef,
writeSTURef,
modifySTURef
) where
import Control.Monad.ST.Lazy
import Data.STRef.Lazy
import qualified Data.Ref.Unboxed as ST
import Data.Unboxed
newSTURef :: (Unboxed a) => a -> ST s (ST.STURef s a)
readSTURef :: (Unboxed a) => ST.STURef s a -> ST s a
writeSTURef :: (Unboxed a) => ST.STURef s a -> a -> ST s ()
modifySTURef :: (Unboxed a) => ST.STURef s a -> (a -> a) -> ST s ()
newSTURef = strictToLazyST . ST.newSTURef
readSTURef = strictToLazyST . ST.readSTURef
writeSTURef r a = strictToLazyST (ST.writeSTURef r a)
modifySTURef r f = strictToLazyST (ST.modifySTURef r f)