bifunctors-5.6.2: Bifunctors
Safe HaskellSafe
LanguageHaskell2010

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 :: (k2 -> k3 -> Type) -> k2 -> k3 -> Type) Source # 
Instance details

Defined in Data.Bifunctor.Sum

Methods

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

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

Defined in Data.Bifunctor.Sum

Methods

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

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

bijoin :: forall (p0 :: k0 -> k10 -> 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 #

Methods

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

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

(Swap p, Swap q) => Swap (Sum p q) Source #

Since: 5.6.1

Instance details

Defined in Data.Bifunctor.Sum

Methods

swap :: Sum p q a b -> Sum p q b a #

(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 #

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

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

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

(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 #

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

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

(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) #

(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 #

(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 #

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

Defined in Data.Bifunctor.Sum

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Sum f g a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Sum f g a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Sum f g a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Sum f g a b] #

(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 #

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

(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 #

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(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 #

(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 #

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

Defined in Data.Bifunctor.Sum

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Sum f g a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Sum f g a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Sum f g a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Sum f g a a0] #

(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 #

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

(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) #

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

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

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

(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 #

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

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 #

Methods

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

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

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

Defined in Data.Bifunctor.Sum

Methods

readsPrec :: Int -> ReadS (Sum p q a b) #

readList :: ReadS [Sum p q a b] #

readPrec :: ReadPrec (Sum p q a b) #

readListPrec :: ReadPrec [Sum p q a b] #

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

Defined in Data.Bifunctor.Sum

Methods

showsPrec :: Int -> Sum p q a b -> ShowS #

show :: Sum p q a b -> String #

showList :: [Sum p q a b] -> ShowS #

(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 #

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

(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 #

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

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

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

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

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

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

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

Defined in Data.Bifunctor.Sum

type Rep1 (Sum p q a :: k1 -> Type) = D1 ('MetaData "Sum" "Data.Bifunctor.Sum" "bifunctors-5.6.2-K1AOrL3x2V3D478fs2jwey" 'False) (C1 ('MetaCons "L2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (p a))) :+: C1 ('MetaCons "R2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (q a))))
type Rep (Sum p q a b) Source # 
Instance details

Defined in Data.Bifunctor.Sum

type Rep (Sum p q a b) = D1 ('MetaData "Sum" "Data.Bifunctor.Sum" "bifunctors-5.6.2-K1AOrL3x2V3D478fs2jwey" 'False) (C1 ('MetaCons "L2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (p a b))) :+: C1 ('MetaCons "R2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (q a b))))