Data.Bifunctor.Flip

bifunctors-5.4.1: 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 #

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

Constructors

Flip |
Fields runFlip :: p b a

Instances

BifunctorFunctor k1 k k k1 (Flip k1 k) # |
Methods bifmap :: (Flip k1 k :-> k) p q -> (k :-> k) (t p) (t q) #
Bifunctor p => Bifunctor (Flip * * p) # |
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) # |
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 #
Bitraversable p => Bitraversable (Flip * * p) # |
Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Flip * * p a b -> f (Flip * * p c d) #
Biapplicative p => Biapplicative (Flip * * p) # |
Methods bipure :: a -> b -> Flip * * p a b # (<<*>>) :: Flip * * p (a -> b) (c -> d) -> Flip * * p a c -> Flip * * p b d # (*>>) :: Flip * * p a b -> Flip * * p c d -> Flip * * p c d # (<<*) :: Flip * * p a b -> Flip * * p c d -> Flip * * p a b #
Bifunctor p => Functor (Flip * * p a) # |
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) # |
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) # |
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) # |
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) # |
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) # |
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) # |
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) # |
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) # |
type Rep (Flip k k1 p a b) = D1 (MetaData "Flip" "Data.Bifunctor.Flip" "bifunctors-5.4.1-EBkHk3WI7L87dRJGvKP176" True) (C1 (MetaCons "Flip" PrefixI True) (S1 (MetaSel (Just Symbol "runFlip") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (p b a))))