bifunctors-5.2: Bifunctors

Safe HaskellSafe
LanguageHaskell98

Data.Bifunctor.Sum

Documentation

data Sum p q a b Source

Constructors

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

Instances

BifunctorFunctor k k k k (Sum k k p) Source 

Methods

bifmap :: (k :-> k) a q -> (k :-> k) (Sum k k p a) (Sum k k p q) Source

BifunctorMonad k k (Sum k k p) Source 

Methods

bireturn :: a b c -> Sum k k p a b c Source

bibind :: (k :-> k) a (Sum k k p q) -> (k :-> k) (Sum k k p a) (Sum k k p q) Source

bijoin :: Sum k k p (Sum k k p a) b c -> Sum k k p a b c 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 b -> Rep1 (Sum k * p q a) b

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

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

Methods

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

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

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

Methods

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

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

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

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

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

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

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

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

Methods

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

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

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

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

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

Methods

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

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

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

Generic (Sum k k p q a b) Source 

Associated Types

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

Methods

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

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

type Rep1 (Sum k k1 p q a) Source 
type Rep (Sum k k1 p q a b) Source