-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A type for pure code that can fail.
--
-- 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.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.1.2
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
instance GHC.Read.Read x => GHC.Read.Read (Control.Exceptional.Exceptional x)
instance GHC.Show.Show x => GHC.Show.Show (Control.Exceptional.Exceptional x)
instance GHC.Classes.Eq x => GHC.Classes.Eq (Control.Exceptional.Exceptional x)
instance GHC.Base.Functor Control.Exceptional.Exceptional
instance GHC.Base.Applicative Control.Exceptional.Exceptional
instance GHC.Base.Alternative Control.Exceptional.Exceptional
instance GHC.Base.Monad Control.Exceptional.Exceptional