Adaptive-0.23: Library for incremental computing.

Safe HaskellNone

Control.Monad.Adaptive.Ref

Documentation

class EqRef r whereSource

Methods

eqRef :: r a -> r a -> BoolSource

Instances

class (EqRef r, Functor m, Monad m) => Ref m r | m -> r whereSource

Methods

newRef :: a -> m (r a)Source

readRef :: r a -> m aSource

writeRef :: r a -> a -> m ()Source

Instances

Ref IO IORef 
(EqRef (STRef s), Functor (ST s), Monad (ST s)) => Ref (ST s) (STRef s) 
(EqRef r, Functor (Changeable m r), Monad (Changeable m r), Ref m r) => Ref (Changeable m r) r 
(EqRef r, Functor (Adaptive m r), Monad (Adaptive m r), Ref m r) => Ref (Adaptive m r) r 
(EqRef r, Functor (OrderedList m r a), Monad (OrderedList m r a), Ref m r) => Ref (OrderedList m r a) r 

mapRef :: Ref m r => (a -> a) -> r a -> m ()Source