-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Essentially the Maybe type with error messages.
--
-- This is a very simple type:
--
--
-- data Exceptional x
-- = Failure String
-- | Success x
--
--
-- It's much like Maybe, except instead of Nothing, we
-- have Failure String.
--
-- A comparison could also be made to Either String. I made this
-- library because I was dissatisfied with the Monad instance
-- for Either. In this type, fail = Failure. It's
-- rather simple.
--
-- Changes
--
--
-- - 0.1.3.0 Fixed a typo. 0.1.2.0 won't build. Also added
-- definition of empty for Alternative.
-- - 0.1.2.0 Add fromEither and toEither
-- functions.
-- - 0.1.1.3 Hackage is terrible. Yet another formatting
-- fix.
-- - 0.1.1.2 Yet another formatting fix.
-- - 0.1.1.1 Formatting fix to the haddock documentation.
-- - 0.1.1.0 Add runExceptional function.
-- - 0.1.0.1 Minor documentation changes. No changes to the
-- API.
-- - 0.1.0.0 Initial version
--
@package exceptional
@version 0.1.3.0
module Control.Exceptional
-- | This is basically specialized 'Either String', or Maybe with
-- error messages.
data Exceptional x
[Failure] :: String -> Exceptional x
[Success] :: x -> Exceptional x
-- | Convert Exceptional into another Monad
runExceptional :: Monad m => Exceptional x -> m x
-- | Convert an Either String to an Exceptional
fromEither :: Either String a -> Exceptional a
-- | Convert an Exceptional to an Either String
toEither :: Exceptional a -> Either String a
instance Read x => Read (Exceptional x)
instance Show x => Show (Exceptional x)
instance Eq x => Eq (Exceptional x)
instance Functor Exceptional
instance Applicative Exceptional
instance Alternative Exceptional
instance Monad Exceptional