bifunctors-5.5.14: Bifunctors
Safe Haskell Safe
Language Haskell2010

Data.Bifunctor.Sum

Documentation

data Sum p q a b Source #

Constructors

L2 (p a b)
R2 (q a b)

Instances

Instances details
BifunctorFunctor ( Sum p :: (k1 -> k2 -> Type ) -> k1 -> k2 -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

bifmap :: forall (p0 :: k -> k -> Type ) (q :: k -> k -> Type ). (p0 :-> q) -> Sum p p0 :-> Sum p q Source #

BifunctorMonad ( Sum p :: (k1 -> k2 -> Type ) -> k1 -> k2 -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

bireturn :: forall (p0 :: k -> k -> Type ). p0 :-> Sum p p0 Source #

bibind :: forall (p0 :: k -> k -> Type ) (q :: k -> k -> Type ). (p0 :-> Sum p q) -> Sum p p0 :-> Sum p q Source #

bijoin :: forall (p0 :: k -> k -> Type ). Sum p ( Sum p p0) :-> Sum p p0 Source #

Generic1 ( Sum p q a :: k1 -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep1 ( Sum p q a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Sum p q a a0 -> Rep1 ( Sum p q a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Sum p q a) a0 -> Sum p q a a0 Source #

( Bitraversable p, Bitraversable q) => Bitraversable ( Sum p q) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Sum p q a b -> f ( Sum p q c d) Source #

( Bifoldable p, Bifoldable q) => Bifoldable ( Sum p q) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

bifold :: Monoid m => Sum p q m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Sum p q a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Sum p q a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Sum p q a b -> c Source #

( Bifunctor p, Bifunctor q) => Bifunctor ( Sum p q) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

bimap :: (a -> b) -> (c -> d) -> Sum p q a c -> Sum p q b d Source #

first :: (a -> b) -> Sum p q a c -> Sum p q b c Source #

second :: (b -> c) -> Sum p q a b -> Sum p q a c Source #

( Eq2 f, Eq2 g) => Eq2 ( Sum f g) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftEq2 :: (a -> b -> Bool ) -> (c -> d -> Bool ) -> Sum f g a c -> Sum f g b d -> Bool Source #

( Ord2 f, Ord2 g) => Ord2 ( Sum f g) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftCompare2 :: (a -> b -> Ordering ) -> (c -> d -> Ordering ) -> Sum f g a c -> Sum f g b d -> Ordering Source #

( Read2 f, Read2 g) => Read2 ( Sum f g) Source #
Instance details

Defined in Data.Bifunctor.Sum

( Show2 f, Show2 g) => Show2 ( Sum f g) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftShowsPrec2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> Int -> Sum f g a b -> ShowS Source #

liftShowList2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> [ Sum f g a b] -> ShowS Source #

( Functor (f a), Functor (g a)) => Functor ( Sum f g a) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

fmap :: (a0 -> b) -> Sum f g a a0 -> Sum f g a b Source #

(<$) :: a0 -> Sum f g a b -> Sum f g a a0 Source #

( Foldable (f a), Foldable (g a)) => Foldable ( Sum f g a) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

fold :: Monoid m => Sum f g a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 Source #

toList :: Sum f g a a0 -> [a0] Source #

null :: Sum f g a a0 -> Bool Source #

length :: Sum f g a a0 -> Int Source #

elem :: Eq a0 => a0 -> Sum f g a a0 -> Bool Source #

maximum :: Ord a0 => Sum f g a a0 -> a0 Source #

minimum :: Ord a0 => Sum f g a a0 -> a0 Source #

sum :: Num a0 => Sum f g a a0 -> a0 Source #

product :: Num a0 => Sum f g a a0 -> a0 Source #

( Traversable (f a), Traversable (g a)) => Traversable ( Sum f g a) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Sum f g a a0 -> f0 ( Sum f g a b) Source #

sequenceA :: Applicative f0 => Sum f g a (f0 a0) -> f0 ( Sum f g a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Sum f g a a0 -> m ( Sum f g a b) Source #

sequence :: Monad m => Sum f g a (m a0) -> m ( Sum f g a a0) Source #

( Eq2 f, Eq2 g, Eq a) => Eq1 ( Sum f g a) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftEq :: (a0 -> b -> Bool ) -> Sum f g a a0 -> Sum f g a b -> Bool Source #

( Ord2 f, Ord2 g, Ord a) => Ord1 ( Sum f g a) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftCompare :: (a0 -> b -> Ordering ) -> Sum f g a a0 -> Sum f g a b -> Ordering Source #

( Read2 f, Read2 g, Read a) => Read1 ( Sum f g a) Source #
Instance details

Defined in Data.Bifunctor.Sum

( Show2 f, Show2 g, Show a) => Show1 ( Sum f g a) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftShowsPrec :: ( Int -> a0 -> ShowS ) -> ([a0] -> ShowS ) -> Int -> Sum f g a a0 -> ShowS Source #

liftShowList :: ( Int -> a0 -> ShowS ) -> ([a0] -> ShowS ) -> [ Sum f g a a0] -> ShowS Source #

( Eq (p a b), Eq (q a b)) => Eq ( Sum p q a b) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

(==) :: Sum p q a b -> Sum p q a b -> Bool Source #

(/=) :: Sum p q a b -> Sum p q a b -> Bool Source #

( Ord (p a b), Ord (q a b)) => Ord ( Sum p q a b) Source #
Instance details

Defined in Data.Bifunctor.Sum

Methods

compare :: Sum p q a b -> Sum p q a b -> Ordering Source #

(<) :: Sum p q a b -> Sum p q a b -> Bool Source #

(<=) :: Sum p q a b -> Sum p q a b -> Bool Source #

(>) :: Sum p q a b -> Sum p q a b -> Bool Source #

(>=) :: Sum p q a b -> Sum p q a b -> Bool Source #

max :: Sum p q a b -> Sum p q a b -> Sum p q a b Source #

min :: Sum p q a b -> Sum p q a b -> Sum p q a b Source #

( Read (p a b), Read (q a b)) => Read ( Sum p q a b) Source #
Instance details

Defined in Data.Bifunctor.Sum

( Show (p a b), Show (q a b)) => Show ( Sum p q a b) Source #
Instance details

Defined in Data.Bifunctor.Sum

Generic ( Sum p q a b) Source #
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep ( Sum p q a b) :: Type -> Type Source #

Methods

from :: Sum p q a b -> Rep ( Sum p q a b) x Source #

to :: Rep ( Sum p q a b) x -> Sum p q a b Source #

type Rep1 ( Sum p q a :: k1 -> Type ) Source #
Instance details

Defined in Data.Bifunctor.Sum

type Rep ( Sum p q a b) Source #
Instance details

Defined in Data.Bifunctor.Sum