bifunctors-5.6.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 | Haskell2010

Data.Bifunctor.Flip

Description

Synopsis

- newtype Flip (p :: k -> k1 -> Type) (a :: k1) (b :: k) = Flip {
  - runFlip :: p b a
  }

# Documentation

newtype Flip (p :: k -> k1 -> Type) (a :: k1) (b :: k) Source #

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

Constructors

Flip |

Fields

- runFlip :: p b a

#### Instances

Instances details

BifunctorFunctor (Flip :: (k3 -> k2 -> Type) -> k2 -> k3 -> Type) Source # |
Instance details Defined in Data.Bifunctor.Flip Methods bifmap :: forall (p :: k3 -> k2 -> Type) (q :: k3 -> k2 -> 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) Source # unassoc :: Flip p a (Flip p b c) -> Flip p (Flip p a b) c Source #
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 Source #
Bifoldable p => Bifoldable (Flip p) Source # |
Instance details Defined in Data.Bifunctor.Flip 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 #
Bifoldable1 p => Bifoldable1 (Flip p) Source # |
Instance details Defined in Data.Bifunctor.Flip Methods bifold1 :: Semigroup m => Flip p m m -> m Source # bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Flip p a b -> m Source #
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 Source # first :: (a -> b) -> Flip p a c -> Flip p b c Source # second :: (b -> c) -> Flip p a b -> Flip p a c Source #
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) Source #
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 Source #
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 Source #
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) Source #

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

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

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

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 Source # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Flip p a b] -> ShowS Source #
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 #
(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 Source #
(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 Source #
(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) Source # liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Flip p a a0] Source # liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Flip p a a0) Source # liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Flip p a a0] Source #
(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 Source # liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Flip p a a0] -> ShowS Source #
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 Source # (<$) :: a0 -> Flip p a b -> Flip p a a0 Source #
Bifoldable p => Foldable (Flip p a) Source # |

Instance details

Defined in Data.Bifunctor.Flip

Methods

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

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

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

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

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

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

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

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

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

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

null :: Flip p a a0 -> Bool Source #

length :: Flip p a a0 -> Int Source #

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

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

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

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

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

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) Source # sequenceA :: Applicative f => Flip p a (f a0) -> f (Flip p a a0) Source # mapM :: Monad m => (a0 -> m b) -> Flip p a a0 -> m (Flip p a b) Source # sequence :: Monad m => Flip p a (m a0) -> m (Flip p a a0) Source #
Generic (Flip p a b) Source # |

Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep (Flip p a b) |
Instance details Defined in Data.Bifunctor.Flip type Rep (Flip p a b) = D1 ('MetaData "Flip" "Data.Bifunctor.Flip" "bifunctors-5.6.2-4kXyA9Yl2Ys9aGae1sUdxu" 'True) (C1 ('MetaCons "Flip" 'PrefixI 'True) (S1 ('MetaSel ('Just "runFlip") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (p b a))))

Methods

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

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

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) Source # readList :: ReadS [Flip p a b] Source # readPrec :: ReadPrec (Flip p a b) Source # readListPrec :: ReadPrec [Flip p a b] Source #
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 Source # show :: Flip p a b -> String Source # showList :: [Flip p a b] -> ShowS Source #
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 Source # (/=) :: Flip p a b -> Flip p a b -> Bool Source #
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 Source #

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

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

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

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

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

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

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.2-4kXyA9Yl2Ys9aGae1sUdxu" 'True) (C1 ('MetaCons "Flip" 'PrefixI 'True) (S1 ('MetaSel ('Just "runFlip") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (p b a))))