bifunctors-5.6.1: Bifunctors
Copyright(C) 2008-2016 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Bifunctor.Flip

Description

 
Synopsis

Documentation

newtype Flip p a b Source #

Make a Bifunctor flipping the arguments of a Bifunctor.

Constructors

Flip 

Fields

Instances

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

Defined in Data.Bifunctor.Flip

Methods

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

Assoc p => Assoc (Flip p) Source #

Since: 5.6.1

Instance details

Defined in Data.Bifunctor.Flip

Methods

assoc :: Flip p (Flip p a b) c -> Flip p a (Flip p b c) #

unassoc :: Flip p a (Flip p b c) -> Flip p (Flip p a b) c #

Swap p => Swap (Flip p) Source #

Since: 5.6.1

Instance details

Defined in Data.Bifunctor.Flip

Methods

swap :: Flip p a b -> Flip p b a #

Bifoldable p => Bifoldable (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bifold :: Monoid m => Flip p m m -> m #

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

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Flip p a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Flip p a b -> c #

Bifunctor p => Bifunctor (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bimap :: (a -> b) -> (c -> d) -> Flip p a c -> Flip p b d #

first :: (a -> b) -> Flip p a c -> Flip p b c #

second :: (b -> c) -> Flip p a b -> Flip p a c #

Bitraversable p => Bitraversable (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Flip p a b -> f (Flip p c d) #

Eq2 p => Eq2 (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Flip p a c -> Flip p b d -> Bool #

Ord2 p => Ord2 (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Flip p a c -> Flip p b d -> Ordering #

Read2 p => Read2 (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Flip p a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Flip p a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Flip p a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Flip p a b] #

Show2 p => Show2 (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Flip p a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Flip p a b] -> ShowS #

Biapplicative p => Biapplicative (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bipure :: a -> b -> Flip p a b Source #

(<<*>>) :: Flip p (a -> b) (c -> d) -> Flip p a c -> Flip p b d Source #

biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> Flip p a d -> Flip p b e -> Flip p c f Source #

(*>>) :: Flip p a b -> Flip p c d -> Flip p c d Source #

(<<*) :: Flip p a b -> Flip p c d -> Flip p a b Source #

Bifoldable1 p => Bifoldable1 (Flip p) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bifold1 :: Semigroup m => Flip p m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Flip p a b -> m #

Bifoldable p => Foldable (Flip p a) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fold :: Monoid m => Flip p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Flip p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Flip p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Flip p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Flip p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Flip p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Flip p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 #

toList :: Flip p a a0 -> [a0] #

null :: Flip p a a0 -> Bool #

length :: Flip p a a0 -> Int #

elem :: Eq a0 => a0 -> Flip p a a0 -> Bool #

maximum :: Ord a0 => Flip p a a0 -> a0 #

minimum :: Ord a0 => Flip p a a0 -> a0 #

sum :: Num a0 => Flip p a a0 -> a0 #

product :: Num a0 => Flip p a a0 -> a0 #

(Eq2 p, Eq a) => Eq1 (Flip p a) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftEq :: (a0 -> b -> Bool) -> Flip p a a0 -> Flip p a b -> Bool #

(Ord2 p, Ord a) => Ord1 (Flip p a) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftCompare :: (a0 -> b -> Ordering) -> Flip p a a0 -> Flip p a b -> Ordering #

(Read2 p, Read a) => Read1 (Flip p a) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Flip p a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Flip p a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Flip p a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Flip p a a0] #

(Show2 p, Show a) => Show1 (Flip p a) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Flip p a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Flip p a a0] -> ShowS #

Bitraversable p => Traversable (Flip p a) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

traverse :: Applicative f => (a0 -> f b) -> Flip p a a0 -> f (Flip p a b) #

sequenceA :: Applicative f => Flip p a (f a0) -> f (Flip p a a0) #

mapM :: Monad m => (a0 -> m b) -> Flip p a a0 -> m (Flip p a b) #

sequence :: Monad m => Flip p a (m a0) -> m (Flip p a a0) #

Bifunctor p => Functor (Flip p a) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fmap :: (a0 -> b) -> Flip p a a0 -> Flip p a b #

(<$) :: a0 -> Flip p a b -> Flip p a a0 #

Generic (Flip p a b) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep (Flip p a b) :: Type -> Type #

Methods

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

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

Read (p b a) => Read (Flip p a b) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

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

readList :: ReadS [Flip p a b] #

readPrec :: ReadPrec (Flip p a b) #

readListPrec :: ReadPrec [Flip p a b] #

Show (p b a) => Show (Flip p a b) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

showsPrec :: Int -> Flip p a b -> ShowS #

show :: Flip p a b -> String #

showList :: [Flip p a b] -> ShowS #

Eq (p b a) => Eq (Flip p a b) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

(==) :: Flip p a b -> Flip p a b -> Bool #

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

Ord (p b a) => Ord (Flip p a b) Source # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

compare :: Flip p a b -> Flip p a b -> Ordering #

(<) :: Flip p a b -> Flip p a b -> Bool #

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

(>) :: Flip p a b -> Flip p a b -> Bool #

(>=) :: Flip p a b -> Flip p a b -> Bool #

max :: Flip p a b -> Flip p a b -> Flip p a b #

min :: Flip p a b -> Flip p a b -> Flip p a b #

type Rep (Flip p a b) Source # 
Instance details

Defined in Data.Bifunctor.Flip

type Rep (Flip p a b) = D1 ('MetaData "Flip" "Data.Bifunctor.Flip" "bifunctors-5.6.1-42auZdaVIr46uhebkv4Fdq" 'True) (C1 ('MetaCons "Flip" 'PrefixI 'True) (S1 ('MetaSel ('Just "runFlip") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (p b a))))