-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | permutation Applicative and Monad with many mtl instances -- -- Based on "Parsing Permutation Phrases", by Arthur Baars, Andres Loeh -- and S. Doaitse Swierstra, Haskell Workshop 2001. The -- implementation given here does not include explicit optional actions, -- and instead implements Alternative and MonadPlus. m -- <*> (lift n <|> pure a) -- should be used where addOpt m a n would be used. @package perm @version 0.4.0.0 module Control.Monad.Perm -- | The permutation applicative data Perm m a -- | Unwrap a Perm, combining actions using the MonadPlus for -- f. runPerm :: MonadPlus m => Perm m a -> m a -- | A version of lift that can be used without a Monad for -- m. liftPerm :: m a -> Perm m a liftPlus :: (forall a. m a -> m a -> m a) -> Perm m b -> Perm m b -> Perm m b -- | Lift a monad homomorphism from m to n into a monad -- homomorphism from Perm m to Perm n. hoistPerm :: MonadFix n => (forall a. m a -> n a) -> Perm m b -> Perm n b module Control.Applicative.Perm -- | The permutation applicative data Perm m a -- | Unwrap a Perm, combining actions using the Alternative -- for f. runPerm :: Alternative m => Perm m a -> m a -- | A version of lift that can be used without a Monad for -- m. liftPerm :: m a -> Perm m a liftPlus :: (forall a. m a -> m a -> m a) -> Perm m b -> Perm m b -> Perm m b -- | Lift a monad homomorphism from m to n into a monad -- homomorphism from Perm m to Perm n. hoistPerm :: MonadFix n => (forall a. m a -> n a) -> Perm m b -> Perm n b