-- 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.3.0.0 module Control.Monad.Perm -- | The permutation monad data PermT m a -- | Unwrap a PermT, combining actions using the MonadPlus -- for f. runPermT :: MonadPlus m => PermT m a -> m a -- | A version of lift that can be used with just an -- Applicative for m. liftPerm :: Applicative m => m a -> PermT m a -- | Lift a monad homomorphism from m to n into a monad -- homomorphism from PermT m to PermT n. hoistPerm :: Monad n => (forall a. m a -> n a) -> PermT m b -> PermT n b module Control.Applicative.Perm -- | The permutation applicative type Perm = PermT -- | 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 with just an -- Applicative for m. liftPerm :: Applicative m => m a -> PermT m a -- | Lift a monad homomorphism from m to n into a monad -- homomorphism from PermT m to PermT n. hoistPerm :: Monad n => (forall a. m a -> n a) -> PermT m b -> PermT n b