binding-core-0.2.2: Data Binding

Safe HaskellSafe-Inferred

Data.Variable

Description

Mutable variables in the IO Monad.

Documentation

class Variable v whereSource

Methods

newVar :: a -> IO (v a)Source

Create a new variable.

readVar :: v a -> IO aSource

Read a variable.

writeVar :: v a -> a -> IO ()Source

Write a variable.

modifyVar :: v a -> (a -> a) -> IO ()Source

Modify a variable.

modifyVar' :: v a -> (a -> (a, b)) -> IO bSource

Modify a variable, and return some value.

Instances