stateful-mtl-1.0.2: Stateful monad transformers with pure evaluation semantics.

Control.Monad.Array.IntMap

Description

A module implementing the array abstraction on a purely functional IntMap. When attempting to debug a complex array-using algorithm, it may sometimes be useful to use a less segfault-prone implementation. In addition, the execXXX commands allow the final state of the IntMap to be returned.

Synopsis

Documentation

data IntMapT e m a Source

An array transformer with an IntMap on the back end. Provides decent performance while retaining a purely functional back end. Note: resizing operations have no effect, and the getSize operation returns the number of associations in the IntMap.

Instances

MonadReader r m => MonadReader r (IntMapT e m) 
MonadState s m => MonadState s (IntMapT e m) 
MonadWriter w m => MonadWriter w (IntMapT e m) 
MonadST s m => MonadST s (IntMapT e m) 
Monad m => MonadArray e (IntMapT e m) 
MonadTrans (IntMapT e) 
Monad m => Monad (IntMapT e m) 
MonadFix m => MonadFix (IntMapT e m) 
MonadPlus m => MonadPlus (IntMapT e m) 
MonadIO m => MonadIO (IntMapT e m) 

data IntMapM e a Source

Basic monad version of IntMapT.

Instances

evalIntMapT :: Monad m => e -> IntMapT e m a -> m aSource

Evaluates an IntMapT computation with the specified default element.

evalIntMapM :: e -> IntMapM e a -> aSource

execIntMapT :: Monad m => e -> IntMapT e m a -> m (IntMap e)Source

Evaluates an IntMapT computation with the specified default element, returning the final IntMap.

execIntMapT_ :: Monad m => IntMapT e m a -> m (IntMap e)Source

Evaluates an IntMapT computation with no default element specified, returning the final IntMap.

evalIntMapT_ :: Monad m => IntMapT e m a -> m aSource

Evaluates an IntMapT computation with no default element specified.