edit-0.0.1.1: A monad for rewriting things.

Copyright(c) Varun Gandhi 2018
LicenseBSD-style (see the file LICENSE)
Maintainertheindigamer15@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.Edit

Description

A monad/comonad transformer for the Edit monad.

I'm not entirely sure what this might be useful for, but it is provided for the sake of completeness. If you find a concrete use case for it, please submit a PR on Github to fix this section!

Documentation

newtype EditT m a Source #

Constructors

EditT 

Fields

Instances

MonadTrans EditT Source # 

Methods

lift :: Monad m => m a -> EditT m a #

Monad m => Monad (EditT m) Source # 

Methods

(>>=) :: EditT m a -> (a -> EditT m b) -> EditT m b #

(>>) :: EditT m a -> EditT m b -> EditT m b #

return :: a -> EditT m a #

fail :: String -> EditT m a #

Functor m => Functor (EditT m) Source # 

Methods

fmap :: (a -> b) -> EditT m a -> EditT m b #

(<$) :: a -> EditT m b -> EditT m a #

Applicative m => Applicative (EditT m) Source # 

Methods

pure :: a -> EditT m a #

(<*>) :: EditT m (a -> b) -> EditT m a -> EditT m b #

liftA2 :: (a -> b -> c) -> EditT m a -> EditT m b -> EditT m c #

(*>) :: EditT m a -> EditT m b -> EditT m b #

(<*) :: EditT m a -> EditT m b -> EditT m a #

Foldable f => Foldable (EditT f) Source # 

Methods

fold :: Monoid m => EditT f m -> m #

foldMap :: Monoid m => (a -> m) -> EditT f a -> m #

foldr :: (a -> b -> b) -> b -> EditT f a -> b #

foldr' :: (a -> b -> b) -> b -> EditT f a -> b #

foldl :: (b -> a -> b) -> b -> EditT f a -> b #

foldl' :: (b -> a -> b) -> b -> EditT f a -> b #

foldr1 :: (a -> a -> a) -> EditT f a -> a #

foldl1 :: (a -> a -> a) -> EditT f a -> a #

toList :: EditT f a -> [a] #

null :: EditT f a -> Bool #

length :: EditT f a -> Int #

elem :: Eq a => a -> EditT f a -> Bool #

maximum :: Ord a => EditT f a -> a #

minimum :: Ord a => EditT f a -> a #

sum :: Num a => EditT f a -> a #

product :: Num a => EditT f a -> a #

Traversable f => Traversable (EditT f) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> EditT f a -> f (EditT f b) #

sequenceA :: Applicative f => EditT f (f a) -> f (EditT f a) #

mapM :: Monad m => (a -> m b) -> EditT f a -> m (EditT f b) #

sequence :: Monad m => EditT f (m a) -> m (EditT f a) #

Eq1 m => Eq1 (EditT m) Source # 

Methods

liftEq :: (a -> b -> Bool) -> EditT m a -> EditT m b -> Bool #

Read1 m => Read1 (EditT m) Source # 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (EditT m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [EditT m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (EditT m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [EditT m a] #

Show1 m => Show1 (EditT m) Source # 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> EditT m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [EditT m a] -> ShowS #

MonadZip m => MonadZip (EditT m) Source # 

Methods

mzip :: EditT m a -> EditT m b -> EditT m (a, b) #

mzipWith :: (a -> b -> c) -> EditT m a -> EditT m b -> EditT m c #

munzip :: EditT m (a, b) -> (EditT m a, EditT m b) #

MonadIO m => MonadIO (EditT m) Source # 

Methods

liftIO :: IO a -> EditT m a #

(Eq1 m, Eq a) => Eq (EditT m a) Source # 

Methods

(==) :: EditT m a -> EditT m a -> Bool #

(/=) :: EditT m a -> EditT m a -> Bool #

(Read1 m, Read a) => Read (EditT m a) Source # 
(Show1 m, Show a) => Show (EditT m a) Source # 

Methods

showsPrec :: Int -> EditT m a -> ShowS #

show :: EditT m a -> String #

showList :: [EditT m a] -> ShowS #

mapEditT :: (m (Edit a) -> n (Edit b)) -> EditT m a -> EditT n b Source #