stateful-mtl-1.0.3: Stateful monad transformers with pure evaluation semantics.Source codeContentsIndex
Control.Monad.Array.MArray
Description
Provides a MonadArray implementation for any MArray. Examples of when this would be useful include unboxed arrays and array implementations for specialized monads like STM.
Synopsis
data MArrayM a e m x
liftMArray :: (Monad m, MArray a e m) => m x -> MArrayM a e m x
evalMArrayM :: (Monad m, MArray a e m) => Int -> e -> MArrayM a e m x -> m x
execMArrayM :: (Monad m, MArray a e m) => Int -> e -> MArrayM a e m x -> m (a Int e)
evalMArrayM_ :: (Monad m, MArray a e m) => Int -> MArrayM a e m x -> m x
execMArrayM_ :: (Monad m, MArray a e m) => Int -> MArrayM a e m x -> m (a Int e)
Documentation
data MArrayM a e m x Source
Provides a monadic wrapper around any MArray implementation.
show/hide Instances
(Monad m, MArray a e m) => MonadArray e (MArrayM a e m)
Monad m => Monad (MArrayM a e m)
MonadFix m => MonadFix (MArrayM a e m)
MonadPlus m => MonadPlus (MArrayM a e m)
MonadIO m => MonadIO (MArrayM a e m)
(Monad m, MonadST m) => MonadST (MArrayM a e m)
liftMArray :: (Monad m, MArray a e m) => m x -> MArrayM a e m xSource
Lifts a computation in the underlying monad to an MArrayM computation on an array in the same monad.
evalMArrayM :: (Monad m, MArray a e m) => Int -> e -> MArrayM a e m x -> m xSource
Executes an MArrayM computation with the specified initial size and default element.
execMArrayM :: (Monad m, MArray a e m) => Int -> e -> MArrayM a e m x -> m (a Int e)Source
Executes an MArrayM computation with the specified initial size and default element, returning the final array.
evalMArrayM_ :: (Monad m, MArray a e m) => Int -> MArrayM a e m x -> m xSource
Executes an MArrayM computation with the specified initial size and no default element.
execMArrayM_ :: (Monad m, MArray a e m) => Int -> MArrayM a e m x -> m (a Int e)Source
Executes an MArrayM computation with the specified initial size and no default element, returning the final array.
Produced by Haddock version 2.4.1