bifunctors-5.4: Bifunctors

Safe HaskellNone
LanguageHaskell98

Data.Bifunctor.Sum

Documentation

data Sum p q a b Source #

Constructors

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

Instances

BifunctorFunctor k k1 k k1 (Sum k k1 p) Source # 

Methods

bifmap :: (Sum k k1 p :-> k) p q -> (k :-> k) (t p) (t q) Source #

BifunctorMonad k k1 (Sum k k1 p) Source # 

Methods

bireturn :: p a b -> t p a b Source #

bibind :: (Sum k k1 p :-> k) p (t q) -> (Sum k k1 p :-> k) (t p) (t q) Source #

bijoin :: t (t p) a b -> t p a b Source #

(Bifunctor p, Bifunctor q) => Bifunctor (Sum * * p q) Source # 

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 #

(Bifoldable p, Bifoldable q) => Bifoldable (Sum * * p q) Source # 

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 #

(Bitraversable p, Bitraversable q) => Bitraversable (Sum * * p q) Source # 

Methods

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

Generic1 (Sum k * p q a) Source # 

Associated Types

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

Methods

from1 :: Sum k * p q a a -> Rep1 (Sum k * p q a) a #

to1 :: Rep1 (Sum k * p q a) a -> Sum k * p q a a #

(Eq (p a b), Eq (q a b)) => Eq (Sum k k1 p q a b) Source # 

Methods

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

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

(Ord (p a b), Ord (q a b)) => Ord (Sum k k1 p q a b) Source # 

Methods

compare :: Sum k k1 p q a b -> Sum k k1 p q a b -> Ordering #

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

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

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

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

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

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

(Read (p a b), Read (q a b)) => Read (Sum k k1 p q a b) Source # 

Methods

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

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

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

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

(Show (p a b), Show (q a b)) => Show (Sum k k1 p q a b) Source # 

Methods

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

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

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

Generic (Sum k k1 p q a b) Source # 

Associated Types

type Rep (Sum k k1 p q a b) :: * -> * #

Methods

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

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

type Rep1 (Sum k * p q a) Source # 
type Rep1 (Sum k * p q a) = D1 (MetaData "Sum" "Data.Bifunctor.Sum" "bifunctors-5.4-21nQkpnOsL4LQMbVs5dXHA" False) ((:+:) (C1 (MetaCons "L2" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 (p a)))) (C1 (MetaCons "R2" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 (q a)))))
type Rep (Sum k k1 p q a b) Source # 
type Rep (Sum k k1 p q a b) = D1 (MetaData "Sum" "Data.Bifunctor.Sum" "bifunctors-5.4-21nQkpnOsL4LQMbVs5dXHA" False) ((:+:) (C1 (MetaCons "L2" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (p a b)))) (C1 (MetaCons "R2" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (q a b)))))