bifunctors-5.4.2: Bifunctors

Copyright | (C) 2008-2016 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Data.Bifunctor.Flip

Description

Synopsis

- newtype Flip p a b = Flip {
  - runFlip :: p b a
  }

# Documentation

newtype Flip p a b Source #

Make a `Bifunctor` flipping the arguments of a `Bifunctor`.

Constructors

Flip |

Fields

- runFlip :: p b a

Instances

BifunctorFunctor k1 k k k1 (Flip k k1) Source # |
Methods bifmap :: (k :-> k) p q -> (Flip k k1 :-> k) (t p) (t q) Source #
Bifunctor p => Bifunctor (Flip * * p) Source # |
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 #
Bifoldable p => Bifoldable (Flip * * p) Source # |
Methods bifold :: Monoid m => Flip * * p m m -> m Source # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Flip * * p a b -> m Source # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Flip * * p a b -> c Source # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Flip * * p a b -> c Source #
Bitraversable p => Bitraversable (Flip * * p) Source # |
Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Flip * * p a b -> f (Flip * * p c d) Source #
Biapplicative p => Biapplicative (Flip * * p) Source # |
Methods bipure :: a -> b -> Flip * * p a b Source # (<<*>>) :: Flip * * p (a -> b) (c -> d) -> Flip * * p a c -> Flip * * p b d 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 #
Bifunctor p => Functor (Flip * * p a) Source # |
Methods fmap :: (a -> b) -> Flip * * p a a -> Flip * * p a b # (<$) :: a -> Flip * * p a b -> Flip * * p a a #
Bifoldable p => Foldable (Flip * * p a) Source # |

Methods

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

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

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

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

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

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

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

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

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

null :: Flip * * p a a -> Bool #

length :: Flip * * p a a -> Int #

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

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

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

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

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

Bitraversable p => Traversable (Flip * * p a) Source # |
Methods traverse :: Applicative f => (a -> f b) -> Flip * * p a a -> f (Flip * * p a b) # sequenceA :: Applicative f => Flip * * p a (f a) -> f (Flip * * p a a) # mapM :: Monad m => (a -> m b) -> Flip * * p a a -> m (Flip * * p a b) # sequence :: Monad m => Flip * * p a (m a) -> m (Flip * * p a a) #
Eq (p b a) => Eq (Flip k k1 p a b) Source # |
Methods (==) :: Flip k k1 p a b -> Flip k k1 p a b -> Bool # (/=) :: Flip k k1 p a b -> Flip k k1 p a b -> Bool #
Ord (p b a) => Ord (Flip k k1 p a b) Source # |

Methods

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

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

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

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

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

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

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

Read (p b a) => Read (Flip k k1 p a b) Source # |
Methods readsPrec :: Int -> ReadS (Flip k k1 p a b) # readList :: ReadS [Flip k k1 p a b] # readPrec :: ReadPrec (Flip k k1 p a b) # readListPrec :: ReadPrec [Flip k k1 p a b] #
Show (p b a) => Show (Flip k k1 p a b) Source # |
Methods showsPrec :: Int -> Flip k k1 p a b -> ShowS # show :: Flip k k1 p a b -> String # showList :: [Flip k k1 p a b] -> ShowS #
Generic (Flip k k1 p a b) Source # |
Associated Types type Rep (Flip k k1 p a b) :: * -> * # Methods from :: Flip k k1 p a b -> Rep (Flip k k1 p a b) x # to :: Rep (Flip k k1 p a b) x -> Flip k k1 p a b #
type Rep (Flip k k1 p a b) Source # |
type Rep (Flip k k1 p a b) = D1 (MetaData "Flip" "Data.Bifunctor.Flip" "bifunctors-5.4.2-D9NYUY1YNw7CNbta2tOtAS" True) (C1 (MetaCons "Flip" PrefixI True) (S1 (MetaSel (Just Symbol "runFlip") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (p b a))))