success-0.2.6: A version of Either specialised for encoding of success or failure

Safe Haskell | None
Language | Haskell2010

Success.Impure

Description

The types and functions are trivial and self-descriptive, hence this sentence is the sole documentation you get on them.

# Documentation

newtype Success a m b #

Constructors

Success (m (Success a b)) |

Instances

(Applicative m, MonadBase n m) => MonadBase n (Success a m) # |
Methods liftBase :: n α -> Success a m α #
(Applicative m, MonadBaseControl n m) => MonadBaseControl n (Success a m) # |
Associated Types type StM (Success a m :: * -> *) a :: * # Methods liftBaseWith :: (RunInBase (Success a m) n -> n a) -> Success a m a # restoreM :: StM (Success a m) a -> Success a m a #
MonadTrans (Success a) # |
Methods lift :: Monad m => m a -> Success a m a #
MonadTransControl (Success a) # |
Associated Types type StT (Success a :: (* -> *) -> * -> *) a :: * # Methods liftWith :: Monad m => (Run (Success a) -> m a) -> Success a m a # restoreT :: Monad m => m (StT (Success a) a) -> Success a m a #
(Applicative m, Monad m) => MonadError (Maybe a) (Success a m) # |
Methods throwError :: Maybe a -> Success a m a # catchError :: Success a m a -> (Maybe a -> Success a m a) -> Success a m a #
(Applicative m, Monad m) => Monad (Success e m) # |
Methods (>>=) :: Success e m a -> (a -> Success e m b) -> Success e m b # (>>) :: Success e m a -> Success e m b -> Success e m b # return :: a -> Success e m a # fail :: String -> Success e m a #
Functor m => Functor (Success a m) # |
Methods fmap :: (a -> b) -> Success a m a -> Success a m b # (<$) :: a -> Success a m b -> Success a m a #
Applicative m => Applicative (Success e m) # |
Methods pure :: a -> Success e m a # (<*>) :: Success e m (a -> b) -> Success e m a -> Success e m b # (*>) :: Success e m a -> Success e m b -> Success e m b # (<*) :: Success e m a -> Success e m b -> Success e m a #
Foldable m => Foldable (Success a m) # |
Methods fold :: Monoid m => Success a m m -> m # foldMap :: Monoid m => (a -> m) -> Success a m a -> m # foldr :: (a -> b -> b) -> b -> Success a m a -> b # foldr' :: (a -> b -> b) -> b -> Success a m a -> b # foldl :: (b -> a -> b) -> b -> Success a m a -> b # foldl' :: (b -> a -> b) -> b -> Success a m a -> b # foldr1 :: (a -> a -> a) -> Success a m a -> a # foldl1 :: (a -> a -> a) -> Success a m a -> a # toList :: Success a m a -> [a] # null :: Success a m a -> Bool # length :: Success a m a -> Int # elem :: Eq a => a -> Success a m a -> Bool # maximum :: Ord a => Success a m a -> a # minimum :: Ord a => Success a m a -> a # sum :: Num a => Success a m a -> a # product :: Num a => Success a m a -> a #
Traversable m => Traversable (Success a m) # |
Methods traverse :: Applicative f => (a -> f b) -> Success a m a -> f (Success a m b) # sequenceA :: Applicative f => Success a m (f a) -> f (Success a m a) # mapM :: Monad m => (a -> m b) -> Success a m a -> m (Success a m b) # sequence :: Monad m => Success a m (m a) -> m (Success a m a) #
(Applicative m, MonadIO m) => MonadIO (Success a m) # |
Methods liftIO :: IO a -> Success a m a #
Applicative m => Alternative (Success e m) # |
Methods empty :: Success e m a # (<|>) :: Success e m a -> Success e m a -> Success e m a # some :: Success e m a -> Success e m [a] # many :: Success e m a -> Success e m [a] #
(Applicative m, Monad m) => MonadPlus (Success e m) # |
Methods mzero :: Success e m a # mplus :: Success e m a -> Success e m a -> Success e m a #
type StT (Success a) b # |
type StT (Success a) b = Success a b
type StM (Success a m) b # |
type StM (Success a m) b = ComposeSt (Success a) m b

run :: Success e m a -> m (Success e a) #

nothing :: Applicative m => Success e m a #

failure :: Applicative m => e -> Success e m a #

success :: Applicative m => a -> Success e m a #