stateful-mtl-1.0.4: Stateful monad transformers with pure evaluation semantics.Source codeContentsIndex
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
data IntMapT e m a
evalIntMapT :: Monad m => e -> IntMapT e m a -> m a
execIntMapT :: Monad m => e -> IntMapT e m a -> m (IntMap e)
execIntMapT_ :: Monad m => IntMapT e m a -> m (IntMap e)
evalIntMapT_ :: Monad m => IntMapT e m a -> m a
data IntMapM e a
execIntMapM :: e -> IntMapM e a -> IntMap e
evalIntMapM :: e -> IntMapM e a -> a
execIntMapM_ :: IntMapM e a -> IntMap e
evalIntMapM_ :: IntMapM e a -> a
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 askSize operation returns the number of associations in the IntMap.
show/hide Instances
evalIntMapT :: Monad m => e -> IntMapT e m a -> m aSource
Evaluates an IntMapT computation with the specified default element.
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.
data IntMapM e a Source
Basic monad version of IntMapT.
show/hide Instances
execIntMapM :: e -> IntMapM e a -> IntMap eSource
evalIntMapM :: e -> IntMapM e a -> aSource
execIntMapM_ :: IntMapM e a -> IntMap eSource
evalIntMapM_ :: IntMapM e a -> aSource
Produced by Haddock version 2.4.1