|
Data.Ref.Universal | Portability | Hugs/GHC | Stability | experimental | Maintainer | Bulat Ziganshin <Bulat.Ziganshin@gmail.com> |
|
|
|
|
|
Description |
Monad-independent interfaces for boxed and unboxed references
|
|
Synopsis |
|
class Monad m => Ref m r | m -> r, r -> m where | | | modifyRef | | modifyRefM | | class Monad m => URef m r | m -> r, r -> m where | | | modifyURef | | modifyURefM |
|
|
|
Monad-independent interface for boxed references
|
|
|
This class allows to create new boxed reference in monad-independent way
(suitable for writing code that will work in IO, ST and other monads)
| | Methods | | Create a new Ref with given initial value
| | | Read the value of an Ref
| | | Write new value into an Ref
|
| | Instances | |
|
|
modifyRef |
|
modifyRefM |
|
Monad-independent interface for unboxed references
|
|
|
Modify the contents of an Ref by applying pure function to it
Modify the contents of an Ref by applying monadic computation to it
This class allows to create new unboxed reference in monad-independent way
(suitable for writing code that will work in IO, ST and other monads)
| | Methods | | Create a new URef with given initial value
| | | Read the value of an URef
| | | Write new value into an URef
|
| | Instances | |
|
|
modifyURef |
|
modifyURefM |
|
Produced by Haddock version 2.4.2 |