-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Either with a stricter Semigroup instance
--
-- A version of Either whose Semigroup instance requires a
-- Semigroup in the Left argument. Unlike most
-- Validation packages, this package does not depend on the entire
-- Kmettverse, preferring a small dependency tree.
@package either-semigroup
@version 0.0.0
module Data.Either.Semigroup
-- | The EitherS type represents values with two possibilities: a
-- value of type EitherS a b is either LeftS
-- a or RightS b.
--
-- The EitherS type is sometimes used to represent a value which
-- is either correct or an error; by convention, the LeftS
-- constructor is used to hold an error value and the RightS
-- constructor is used to hold a correct value (mnemonic: "right" also
-- means "correct").
--
-- This type differs from Either in the Semigroup instance,
-- requiring the LeftS type to be a Semigroup in the first
-- place.
data EitherS l r
LeftS :: l -> EitherS l r
RightS :: r -> EitherS l r
-- | Turn an EitherS value into a plain Either value.
toEither :: EitherS l r -> Either l r
unLeftS :: EitherS l r -> Maybe l
unRightS :: EitherS l r -> Maybe r
eitherS :: (l -> x) -> (r -> x) -> EitherS l r -> x
leftsS :: [EitherS l r] -> [l]
rightsS :: [EitherS l r] -> [r]
instance (Data.Data.Data l, Data.Data.Data r) => Data.Data.Data (Data.Either.Semigroup.EitherS l r)
instance GHC.Generics.Generic1 (Data.Either.Semigroup.EitherS l)
instance GHC.Generics.Generic (Data.Either.Semigroup.EitherS l r)
instance GHC.Base.Functor (Data.Either.Semigroup.EitherS l)
instance (GHC.Read.Read l, GHC.Read.Read r) => GHC.Read.Read (Data.Either.Semigroup.EitherS l r)
instance (GHC.Show.Show l, GHC.Show.Show r) => GHC.Show.Show (Data.Either.Semigroup.EitherS l r)
instance (GHC.Classes.Ord l, GHC.Classes.Ord r) => GHC.Classes.Ord (Data.Either.Semigroup.EitherS l r)
instance (GHC.Classes.Eq l, GHC.Classes.Eq r) => GHC.Classes.Eq (Data.Either.Semigroup.EitherS l r)
instance GHC.Base.Semigroup l => GHC.Base.Semigroup (Data.Either.Semigroup.EitherS l r)
instance GHC.Base.Monoid l => GHC.Base.Monoid (Data.Either.Semigroup.EitherS l r)
instance GHC.Base.Monoid l => GHC.Base.Applicative (Data.Either.Semigroup.EitherS l)
instance GHC.Base.Monoid l => GHC.Base.Monad (Data.Either.Semigroup.EitherS l)
instance GHC.Base.Monoid l => Control.Monad.Fix.MonadFix (Data.Either.Semigroup.EitherS l)
instance Data.Bifunctor.Bifunctor Data.Either.Semigroup.EitherS
instance Data.Foldable.Foldable (Data.Either.Semigroup.EitherS l)
instance Data.Bifoldable.Bifoldable Data.Either.Semigroup.EitherS
instance Data.Bifoldable1.Bifoldable1 Data.Either.Semigroup.EitherS
instance Data.Traversable.Traversable (Data.Either.Semigroup.EitherS l)
instance Data.Bitraversable.Bitraversable Data.Either.Semigroup.EitherS
instance GHC.Classes.Eq l => Data.Functor.Classes.Eq1 (Data.Either.Semigroup.EitherS l)
instance Data.Functor.Classes.Eq2 Data.Either.Semigroup.EitherS
instance GHC.Classes.Ord l => Data.Functor.Classes.Ord1 (Data.Either.Semigroup.EitherS l)
instance Data.Functor.Classes.Ord2 Data.Either.Semigroup.EitherS