ArrayRef-0.1.2: Unboxed references, dynamic arrays and moreSource codeContentsIndex
Data.Ref.Unboxed
PortabilityGHC/Hugs
Stabilityexperimental
MaintainerBulat Ziganshin <Bulat.Ziganshin@gmail.com>
Description

Unboxed references

Based on the idea of Oleg Kiselyov (see http:www.haskell.orgpipermailhaskell-cafe2004-July006400.html)

Synopsis
newtype IOURef a = IOURef (IOSpecific2 MUVec a)
ioURefTc :: TyCon
newIOURef :: Unboxed a => a -> IO (IOURef a)
readIOURef :: Unboxed a => IOURef a -> IO a
writeIOURef :: Unboxed a => IOURef a -> a -> IO ()
modifyIOURef :: Unboxed a => IOURef a -> (a -> a) -> IO ()
newtype STURef s a = STURef (MUVec s a)
stURefTc :: TyCon
newSTURef :: Unboxed a => a -> ST s (STURef s a)
readSTURef :: Unboxed a => STURef s a -> ST s a
writeSTURef :: Unboxed a => STURef s a -> a -> ST s ()
modifySTURef :: Unboxed a => STURef s a -> (a -> a) -> ST s ()
Documentation
newtype IOURef a Source
Unboxed references in IO monad
Constructors
IOURef (IOSpecific2 MUVec a)
show/hide Instances
ioURefTc :: TyConSource
newIOURef :: Unboxed a => a -> IO (IOURef a)Source
Create new unboxed reference in IO monad
readIOURef :: Unboxed a => IOURef a -> IO aSource
Read current value of unboxed reference in IO monad
writeIOURef :: Unboxed a => IOURef a -> a -> IO ()Source
Change value of unboxed reference in IO monad
modifyIOURef :: Unboxed a => IOURef a -> (a -> a) -> IO ()Source
Modify contents of an IOURef by applying pure function to it
newtype STURef s a Source
Unboxed references in ST monad
Constructors
STURef (MUVec s a)
show/hide Instances
stURefTc :: TyConSource
newSTURef :: Unboxed a => a -> ST s (STURef s a)Source
Create new unboxed reference in ST monad
readSTURef :: Unboxed a => STURef s a -> ST s aSource
Read current value of unboxed reference in ST monad
writeSTURef :: Unboxed a => STURef s a -> a -> ST s ()Source
Change value of unboxed reference in ST monad
modifySTURef :: Unboxed a => STURef s a -> (a -> a) -> ST s ()Source
Modify contents of an STURef by applying pure function to it
Produced by Haddock version 2.1.0