perm-0.1.0.1: permutation Applicative and Monad with many mtl instances

Portabilitynon-portable
Stabilityexperimental
MaintainerAndy Sonnenburg <andy22286@gmail.com>
Safe HaskellSafe-Inferred

Control.Monad.Perm

Description

 

Synopsis

Documentation

type PermT = PermT' MonadSource

The permutation monad

runPermT :: MonadPlus m => PermT m a -> m aSource

Unwrap a PermT, combining actions using the MonadPlus for f.

data PermT' c m a Source

The permutation action, available as either an Applicative or a Monad, determined by the combinators used.

Instances

(Monad (PermT m), MonadThrow e m) => MonadThrow e (PermT m) 
(Monad (PermT m), MonadReader r m) => MonadReader r (PermT m) 
(Monad (PermT m), MonadState s m) => MonadState s (PermT m) 
Monad (PermT m) 
Monad (PermT m) => MonadPlus (PermT m) 
(Monad (PermT m), MonadIO m) => MonadIO (PermT m) 
MonadTrans (PermT' c) 
Functor (PermT' c m) 
Functor (PermT' c m) => Applicative (PermT' c m) 
Applicative (PermT' c m) => Alternative (PermT' c m) 

liftPerm :: m a -> PermT' c m aSource

A version of lift without the Monad m constraint

hoistPerm :: (forall a. m a -> n a) -> PermT' c m b -> PermT' c n bSource

Lift a natural transformation from m to n into a natural transformation from PermT' c m to PermT' c n.