-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A version of Either specialised for encoding of success or failure
--   
--   The primary motivation for creation of this package was the need for
--   the <a>Alternative</a> instance of <a>Either</a>, which there is no
--   sane way to implement. The type provided by this library extends
--   <a>Either</a> in a way to provide the missing instance.
@package success
@version 0.2.6


-- | The types and functions are trivial and self-descriptive, hence this
--   sentence is the sole documentation you get on them.
module Success.Pure
data Success a b
nothing :: Success a b
failure :: a -> Success a b
success :: b -> Success a b
asEither :: Success a b -> Either (Maybe a) b
asMaybe :: Success a b -> Maybe b
instance Data.Traversable.Traversable (Success.Pure.Success a)
instance Data.Foldable.Foldable (Success.Pure.Success a)
instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Success.Pure.Success a b)
instance Control.Monad.Error.Class.MonadError (GHC.Base.Maybe a) (Success.Pure.Success a)
instance GHC.Base.Monad (Success.Pure.Success a)
instance GHC.Base.Applicative (Success.Pure.Success a)
instance GHC.Base.Functor (Success.Pure.Success a)
instance GHC.Base.Alternative (Success.Pure.Success a)
instance GHC.Base.MonadPlus (Success.Pure.Success a)


-- | The types and functions are trivial and self-descriptive, hence this
--   sentence is the sole documentation you get on them.
module Success.Impure
newtype Success a m b
Success :: (m (Success a b)) -> 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
instance Data.Traversable.Traversable m => Data.Traversable.Traversable (Success.Impure.Success a m)
instance Data.Foldable.Foldable m => Data.Foldable.Foldable (Success.Impure.Success a m)
instance GHC.Base.Functor m => GHC.Base.Functor (Success.Impure.Success a m)
instance GHC.Base.Applicative m => GHC.Base.Applicative (Success.Impure.Success e m)
instance GHC.Base.Applicative m => GHC.Base.Alternative (Success.Impure.Success e m)
instance (GHC.Base.Applicative m, GHC.Base.Monad m) => GHC.Base.Monad (Success.Impure.Success e m)
instance (GHC.Base.Applicative m, GHC.Base.Monad m) => GHC.Base.MonadPlus (Success.Impure.Success e m)
instance (GHC.Base.Applicative m, GHC.Base.Monad m) => Control.Monad.Error.Class.MonadError (GHC.Base.Maybe a) (Success.Impure.Success a m)
instance Control.Monad.Trans.Class.MonadTrans (Success.Impure.Success a)
instance (GHC.Base.Applicative m, Control.Monad.IO.Class.MonadIO m) => Control.Monad.IO.Class.MonadIO (Success.Impure.Success a m)
instance (GHC.Base.Applicative m, Control.Monad.Base.MonadBase n m) => Control.Monad.Base.MonadBase n (Success.Impure.Success a m)
instance Control.Monad.Trans.Control.MonadTransControl (Success.Impure.Success a)
instance (GHC.Base.Applicative m, Control.Monad.Trans.Control.MonadBaseControl n m) => Control.Monad.Trans.Control.MonadBaseControl n (Success.Impure.Success a m)
