-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Bifunctors
--   
--   Bifunctors
@package bifunctors
@version 5.4.2

module Data.Bifunctor.Functor

-- | Using parametricity as an approximation of a natural transformation in
--   two arguments.
type (:->) p q = forall a b. p a b -> q a b
class BifunctorFunctor t
bifmap :: BifunctorFunctor t => (p :-> q) -> t p :-> t q
class BifunctorFunctor t => BifunctorMonad t where bibind f = bijoin . bifmap f bijoin = bibind id
bireturn :: BifunctorMonad t => p :-> t p
bibind :: BifunctorMonad t => (p :-> t q) -> t p :-> t q
bijoin :: BifunctorMonad t => t (t p) :-> t p
biliftM :: BifunctorMonad t => (p :-> q) -> t p :-> t q
class BifunctorFunctor t => BifunctorComonad t where biextend f = bifmap f . biduplicate biduplicate = biextend id
biextract :: BifunctorComonad t => t p :-> p
biextend :: BifunctorComonad t => (t p :-> q) -> t p :-> t q
biduplicate :: BifunctorComonad t => t p :-> t (t p)
biliftW :: BifunctorComonad t => (p :-> q) -> t p :-> t q

module Data.Bifoldable

-- | Bifoldable identifies foldable structures with two different
--   varieties of elements (as opposed to Foldable, which has one
--   variety of element). Common examples are Either and '(,)':
--   
--   
--   instance Bifoldable Either where
--     bifoldMap f _ (Left  a) = f a
--     bifoldMap _ g (Right b) = g b
--   
--   instance Bifoldable (,) where
--     bifoldr f g z (a, b) = f a (g b z)
--   
--   
--   A minimal Bifoldable definition consists of either
--   bifoldMap or bifoldr. When defining more than this
--   minimal set, one should ensure that the following identities hold:
--   
--   
--   bifold ≡ bifoldMap id id
--   bifoldMap f g ≡ bifoldr (mappend . f) (mappend . g) mempty
--   bifoldr f g z t ≡ appEndo (bifoldMap (Endo . f) (Endo . g) t) z
--   
--   
--   If the type is also a Bifunctor instance, it should satisfy:
--   
--   
--   'bifoldMap' f g ≡ 'bifold' . 'bimap' f g
--   
--   
--   which implies that
--   
--   
--   'bifoldMap' f g . 'bimap' h i ≡ 'bifoldMap' (f . h) (g . i)
--   
class Bifoldable p where bifold = bifoldMap id id bifoldMap f g = bifoldr (mappend . f) (mappend . g) mempty bifoldr f g z t = appEndo (bifoldMap (Endo #. f) (Endo #. g) t) z bifoldl f g z t = appEndo (getDual (bifoldMap (Dual . Endo . flip f) (Dual . Endo . flip g) t)) z

-- | Combines the elements of a structure using a monoid.
--   
--   
--   bifold ≡ bifoldMap id id
--   
bifold :: (Bifoldable p, Monoid m) => p m m -> m

-- | Combines the elements of a structure, given ways of mapping them to a
--   common monoid.
--   
--   
--   bifoldMap f g ≡ bifoldr (mappend . f) (mappend . g) mempty
--   
bifoldMap :: (Bifoldable p, Monoid m) => (a -> m) -> (b -> m) -> p a b -> m

-- | Combines the elements of a structure in a right associative manner.
--   Given a hypothetical function toEitherList :: p a b -> [Either
--   a b] yielding a list of all elements of a structure in order, the
--   following would hold:
--   
--   
--   bifoldr f g z ≡ foldr (either f g) z . toEitherList
--   
bifoldr :: Bifoldable p => (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c

-- | Combines the elments of a structure in a left associative manner.
--   Given a hypothetical function toEitherList :: p a b -> [Either
--   a b] yielding a list of all elements of a structure in order, the
--   following would hold:
--   
--   
--   bifoldl f g z ≡ foldl (acc -> either (f acc) (g acc)) z .  toEitherList
--   
--   
--   Note that if you want an efficient left-fold, you probably want to use
--   bifoldl' instead of bifoldl. The reason is that the
--   latter does not force the "inner" results, resulting in a thunk chain
--   which then must be evaluated from the outside-in.
bifoldl :: Bifoldable p => (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c

-- | As bifoldr, but strict in the result of the reduction functions
--   at each step.
bifoldr' :: Bifoldable t => (a -> c -> c) -> (b -> c -> c) -> c -> t a b -> c

-- | A variant of bifoldr that has no base case, and thus may only
--   be applied to non-empty structures.
bifoldr1 :: Bifoldable t => (a -> a -> a) -> t a a -> a

-- | Right associative monadic bifold over a structure.
bifoldrM :: (Bifoldable t, Monad m) => (a -> c -> m c) -> (b -> c -> m c) -> c -> t a b -> m c

-- | As bifoldl, but strict in the result of the reduction functions
--   at each step.
--   
--   This ensures that each step of the bifold is forced to weak head
--   normal form before being applied, avoiding the collection of thunks
--   that would otherwise occur. This is often what you want to strictly
--   reduce a finite structure to a single, monolithic result (e.g.,
--   bilength).
bifoldl' :: Bifoldable t => (a -> b -> a) -> (a -> c -> a) -> a -> t b c -> a

-- | A variant of bifoldl that has no base case, and thus may only
--   be applied to non-empty structures.
bifoldl1 :: Bifoldable t => (a -> a -> a) -> t a a -> a

-- | Left associative monadic bifold over a structure.
bifoldlM :: (Bifoldable t, Monad m) => (a -> b -> m a) -> (a -> c -> m a) -> a -> t b c -> m a

-- | Map each element of a structure using one of two actions, evaluate
--   these actions from left to right, and ignore the results. For a
--   version that doesn't ignore the results, see bitraverse.
bitraverse_ :: (Bifoldable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f ()

-- | As bitraverse_, but with the structure as the primary argument.
--   For a version that doesn't ignore the results, see bifor.
--   
--   
--   >>> > bifor_ ('a', "bc") print (print . reverse)
--   'a'
--   "cb"
--   
bifor_ :: (Bifoldable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f ()

-- | As bimapM, but ignores the results of the functions, merely
--   performing the "actions".
bimapM_ :: (Bifoldable t, Monad m) => (a -> m c) -> (b -> m d) -> t a b -> m ()

-- | As bimapM_, but with the structure as the primary argument.
biforM_ :: (Bifoldable t, Monad m) => t a b -> (a -> m c) -> (b -> m d) -> m ()

-- | The sum of a collection of actions, generalizing biconcat.
bimsum :: (Bifoldable t, MonadPlus m) => t (m a) (m a) -> m a

-- | As bisequenceA, but ignores the results of the actions.
bisequenceA_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f ()

-- | Evaluate each action in the structure from left to right, and ignore
--   the results. For a version that doesn't ignore the results, see
--   bisequence.
bisequence_ :: (Bifoldable t, Monad m) => t (m a) (m b) -> m ()

-- | The sum of a collection of actions, generalizing biconcat.
biasum :: (Bifoldable t, Alternative f) => t (f a) (f a) -> f a

-- | Collects the list of elements of a structure, from left to right.
biList :: Bifoldable t => t a a -> [a]

-- | Test whether the structure is empty.
binull :: Bifoldable t => t a b -> Bool

-- | Returns the size/length of a finite structure as an Int.
bilength :: Bifoldable t => t a b -> Int

-- | Does the element occur in the structure?
bielem :: (Bifoldable t, Eq a) => a -> t a a -> Bool

-- | The largest element of a non-empty structure.
bimaximum :: forall t a. (Bifoldable t, Ord a) => t a a -> a

-- | The least element of a non-empty structure.
biminimum :: forall t a. (Bifoldable t, Ord a) => t a a -> a

-- | The bisum function computes the sum of the numbers of a
--   structure.
bisum :: (Bifoldable t, Num a) => t a a -> a

-- | The biproduct function computes the product of the numbers of a
--   structure.
biproduct :: (Bifoldable t, Num a) => t a a -> a

-- | Reduces a structure of lists to the concatenation of those lists.
biconcat :: Bifoldable t => t [a] [a] -> [a]

-- | Given a means of mapping the elements of a structure to lists,
--   computes the concatenation of all such lists in order.
biconcatMap :: Bifoldable t => (a -> [c]) -> (b -> [c]) -> t a b -> [c]

-- | biand returns the conjunction of a container of Bools. For the
--   result to be True, the container must be finite; False,
--   however, results from a False value finitely far from the left
--   end.
biand :: Bifoldable t => t Bool Bool -> Bool

-- | bior returns the disjunction of a container of Bools. For the
--   result to be False, the container must be finite; True,
--   however, results from a True value finitely far from the left
--   end.
bior :: Bifoldable t => t Bool Bool -> Bool

-- | Determines whether any element of the structure satisfies the
--   appropriate predicate.
biany :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool

-- | Determines whether all elements of the structure satisfy the
--   appropriate predicate.
biall :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool

-- | The largest element of a non-empty structure with respect to the given
--   comparison function.
bimaximumBy :: Bifoldable t => (a -> a -> Ordering) -> t a a -> a

-- | The least element of a non-empty structure with respect to the given
--   comparison function.
biminimumBy :: Bifoldable t => (a -> a -> Ordering) -> t a a -> a

-- | binotElem is the negation of bielem.
binotElem :: (Bifoldable t, Eq a) => a -> t a a -> Bool

-- | The bifind function takes a predicate and a structure and
--   returns the leftmost element of the structure matching the predicate,
--   or Nothing if there is no such element.
bifind :: Bifoldable t => (a -> Bool) -> t a a -> Maybe a
instance Data.Bifoldable.Bifoldable Data.Semigroup.Arg
instance Data.Bifoldable.Bifoldable (,)
instance Data.Bifoldable.Bifoldable Data.Functor.Const.Const
instance Data.Bifoldable.Bifoldable Data.Functor.Constant.Constant
instance Data.Bifoldable.Bifoldable (GHC.Generics.K1 i)
instance Data.Bifoldable.Bifoldable ((,,) x)
instance Data.Bifoldable.Bifoldable ((,,,) x y)
instance Data.Bifoldable.Bifoldable ((,,,,) x y z)
instance Data.Bifoldable.Bifoldable ((,,,,,) x y z w)
instance Data.Bifoldable.Bifoldable ((,,,,,,) x y z w v)
instance Data.Bifoldable.Bifoldable Data.Tagged.Tagged
instance Data.Bifoldable.Bifoldable Data.Either.Either
instance GHC.Classes.Ord a => GHC.Base.Monoid (Data.Bifoldable.Max a)
instance GHC.Classes.Ord a => GHC.Base.Monoid (Data.Bifoldable.Min a)

module Data.Bitraversable

-- | Bitraversable identifies bifunctorial data structures whose
--   elements can be traversed in order, performing Applicative or
--   Monad actions at each element, and collecting a result
--   structure with the same shape.
--   
--   As opposed to Traversable data structures, which have one
--   variety of element on which an action can be performed,
--   Bitraversable data structures have two such varieties of
--   elements.
--   
--   A definition of bitraverse must satisfy the following laws:
--   
--   
--   
- naturality bitraverse (t . f) (t . g) ≡ t
--   . bitraverse f g for every applicative transformation
--   t
--   
- identity bitraverse Identity
--   Identity ≡ Identity
--   
- composition Compose . fmap
--   (bitraverse g1 g2) . bitraverse f1 f2 ≡ traverse
--   (Compose . fmap g1 . f1) (Compose .
--   fmap g2 . f2)
--   
--   
--   where an applicative transformation is a function
--   
--   
--   t :: (Applicative f, Applicative g) => f a -> g a
--   
--   
--   preserving the Applicative operations:
--   
--   
--   t (pure x) = pure x
--   t (f <*> x) = t f <*> t x
--   
--   
--   and the identity functor Identity and composition functors
--   Compose are defined as
--   
--   
--   newtype Identity a = Identity { runIdentity :: a }
--   
--   instance Functor Identity where
--     fmap f (Identity x) = Identity (f x)
--   
--   instance Applicative Identity where
--     pure = Identity
--     Identity f <*> Identity x = Identity (f x)
--   
--   newtype Compose f g a = Compose (f (g a))
--   
--   instance (Functor f, Functor g) => Functor (Compose f g) where
--     fmap f (Compose x) = Compose (fmap (fmap f) x)
--   
--   instance (Applicative f, Applicative g) => Applicative (Compose f g) where
--     pure = Compose . pure . pure
--     Compose f <*> Compose x = Compose ((<*>) <$> f <*> x)
--   
--   
--   Some simple examples are Either and '(,)':
--   
--   
--   instance Bitraversable Either where
--     bitraverse f _ (Left x) = Left <$> f x
--     bitraverse _ g (Right y) = Right <$> g y
--   
--   instance Bitraversable (,) where
--     bitraverse f g (x, y) = (,) <$> f x <*> g y
--   
--   
--   Bitraversable relates to its superclasses in the following
--   ways:
--   
--   
--   bimap f g ≡ runIdentity . bitraverse (Identity . f) (Identity . g)
--   bifoldMap f g = getConst . bitraverse (Const . f) (Const . g)
--   
--   
--   These are available as bimapDefault and bifoldMapDefault
--   respectively.
class (Bifunctor t, Bifoldable t) => Bitraversable t where bitraverse f g = bisequenceA . bimap f g

-- | Evaluates the relevant functions at each element in the structure,
--   running the action, and builds a new structure with the same shape,
--   using the elements produced from sequencing the actions.
--   
--   
--   bitraverse f g ≡ bisequenceA . bimap f g
--   
--   
--   For a version that ignores the results, see bitraverse_.
bitraverse :: (Bitraversable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)

-- | Sequences all the actions in a structure, building a new structure
--   with the same shape using the results of the actions. For a version
--   that ignores the results, see bisequenceA_.
--   
--   
--   bisequenceA ≡ bitraverse id id
--   
bisequenceA :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)

-- | As bisequenceA, but uses evidence that m is a
--   Monad rather than an Applicative. For a version that
--   ignores the results, see bisequence_.
--   
--   
--   bisequence ≡ bimapM id id
--   bisequence ≡ unwrapMonad . bisequenceA . bimap WrapMonad WrapMonad
--   
bisequence :: (Bitraversable t, Monad m) => t (m a) (m b) -> m (t a b)

-- | As bitraverse, but uses evidence that m is a
--   Monad rather than an Applicative. For a version that
--   ignores the results, see bimapM_.
--   
--   
--   bimapM f g ≡ bisequence . bimap f g
--   bimapM f g ≡ unwrapMonad . bitraverse (WrapMonad . f) (WrapMonad . g)
--   
bimapM :: (Bitraversable t, Monad m) => (a -> m c) -> (b -> m d) -> t a b -> m (t c d)

-- | bifor is bitraverse with the structure as the first
--   argument. For a version that ignores the results, see bifor_.
bifor :: (Bitraversable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f (t c d)

-- | biforM is bimapM with the structure as the first
--   argument. For a version that ignores the results, see biforM_.
biforM :: (Bitraversable t, Monad m) => t a b -> (a -> m c) -> (b -> m d) -> m (t c d)

-- | The bimapAccumL function behaves like a combination of
--   bimap and bifoldl; it traverses a structure from left to
--   right, threading a state of type a and using the given
--   actions to compute new elements for the structure.
bimapAccumL :: Bitraversable t => (a -> b -> (a, c)) -> (a -> d -> (a, e)) -> a -> t b d -> (a, t c e)

-- | The bimapAccumR function behaves like a combination of
--   bimap and bifoldl; it traverses a structure from right
--   to left, threading a state of type a and using the given
--   actions to compute new elements for the structure.
bimapAccumR :: Bitraversable t => (a -> b -> (a, c)) -> (a -> d -> (a, e)) -> a -> t b d -> (a, t c e)

-- | A default definition of bimap in terms of the
--   Bitraversable operations.
--   
--   
--   bimapDefault f g ≡
--        runIdentity . bitraverse (Identity . f) (Identity . g)
--   
bimapDefault :: forall t a b c d. Bitraversable t => (a -> b) -> (c -> d) -> t a c -> t b d

-- | A default definition of bifoldMap in terms of the
--   Bitraversable operations.
--   
--   
--   bifoldMapDefault f g ≡
--       getConst . bitraverse (Const . f) (Const . g)
--   
bifoldMapDefault :: forall t m a b. (Bitraversable t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> m
instance Data.Bitraversable.Bitraversable Data.Semigroup.Arg
instance Data.Bitraversable.Bitraversable (,)
instance Data.Bitraversable.Bitraversable ((,,) x)
instance Data.Bitraversable.Bitraversable ((,,,) x y)
instance Data.Bitraversable.Bitraversable ((,,,,) x y z)
instance Data.Bitraversable.Bitraversable ((,,,,,) x y z w)
instance Data.Bitraversable.Bitraversable ((,,,,,,) x y z w v)
instance Data.Bitraversable.Bitraversable Data.Either.Either
instance Data.Bitraversable.Bitraversable Data.Functor.Const.Const
instance Data.Bitraversable.Bitraversable Data.Functor.Constant.Constant
instance Data.Bitraversable.Bitraversable (GHC.Generics.K1 i)
instance Data.Bitraversable.Bitraversable Data.Tagged.Tagged
instance GHC.Base.Functor (Data.Bitraversable.StateL s)
instance GHC.Base.Applicative (Data.Bitraversable.StateL s)
instance GHC.Base.Functor (Data.Bitraversable.StateR s)
instance GHC.Base.Applicative (Data.Bitraversable.StateR s)

module Data.Bifunctor.Sum
data Sum p q a b
L2 :: (p a b) -> Sum p q a b
R2 :: (q a b) -> Sum p q a b
instance forall k (p :: k -> * -> *) (q :: k -> * -> *) (a :: k). GHC.Generics.Generic1 (Data.Bifunctor.Sum.Sum p q a)
instance forall k k1 (p :: k -> k1 -> *) (q :: k -> k1 -> *) (a :: k) (b :: k1). GHC.Generics.Generic (Data.Bifunctor.Sum.Sum p q a b)
instance forall k k1 (p :: k -> k1 -> *) (q :: k -> k1 -> *) (a :: k) (b :: k1). (GHC.Read.Read (q a b), GHC.Read.Read (p a b)) => GHC.Read.Read (Data.Bifunctor.Sum.Sum p q a b)
instance forall k k1 (p :: k -> k1 -> *) (q :: k -> k1 -> *) (a :: k) (b :: k1). (GHC.Show.Show (q a b), GHC.Show.Show (p a b)) => GHC.Show.Show (Data.Bifunctor.Sum.Sum p q a b)
instance forall k k1 (p :: k -> k1 -> *) (q :: k -> k1 -> *) (a :: k) (b :: k1). (GHC.Classes.Ord (q a b), GHC.Classes.Ord (p a b)) => GHC.Classes.Ord (Data.Bifunctor.Sum.Sum p q a b)
instance forall k k1 (p :: k -> k1 -> *) (q :: k -> k1 -> *) (a :: k) (b :: k1). (GHC.Classes.Eq (q a b), GHC.Classes.Eq (p a b)) => GHC.Classes.Eq (Data.Bifunctor.Sum.Sum p q a b)
instance (Data.Bifunctor.Bifunctor p, Data.Bifunctor.Bifunctor q) => Data.Bifunctor.Bifunctor (Data.Bifunctor.Sum.Sum p q)
instance (Data.Bifoldable.Bifoldable p, Data.Bifoldable.Bifoldable q) => Data.Bifoldable.Bifoldable (Data.Bifunctor.Sum.Sum p q)
instance (Data.Bitraversable.Bitraversable p, Data.Bitraversable.Bitraversable q) => Data.Bitraversable.Bitraversable (Data.Bifunctor.Sum.Sum p q)
instance forall k k1 (p :: k1 -> k -> *). Data.Bifunctor.Functor.BifunctorFunctor (Data.Bifunctor.Sum.Sum p)
instance forall k k1 (p :: k1 -> k -> *). Data.Bifunctor.Functor.BifunctorMonad (Data.Bifunctor.Sum.Sum p)

-- | Functions to mechanically derive Bifunctor, Bifoldable,
--   or Bitraversable instances, or to splice their functions
--   directly into source code. You need to enable the
--   TemplateHaskell language extension in order to use this
--   module.
module Data.Bifunctor.TH

-- | Generates a Bifunctor instance declaration for the given data
--   type or data family instance.
deriveBifunctor :: Name -> Q [Dec]

-- | Generates a lambda expression which behaves like bimap
--   (without requiring a Bifunctor instance).
makeBimap :: Name -> Q Exp

-- | Generates a Bifoldable instance declaration for the given data
--   type or data family instance.
deriveBifoldable :: Name -> Q [Dec]

-- | Generates a lambda expression which behaves like bifold
--   (without requiring a Bifoldable instance).
makeBifold :: Name -> Q Exp

-- | Generates a lambda expression which behaves like bifoldMap
--   (without requiring a Bifoldable instance).
makeBifoldMap :: Name -> Q Exp

-- | Generates a lambda expression which behaves like bifoldr
--   (without requiring a Bifoldable instance).
makeBifoldr :: Name -> Q Exp

-- | Generates a lambda expression which behaves like bifoldl
--   (without requiring a Bifoldable instance).
makeBifoldl :: Name -> Q Exp

-- | Generates a Bitraversable instance declaration for the given
--   data type or data family instance.
deriveBitraversable :: Name -> Q [Dec]

-- | Generates a lambda expression which behaves like bitraverse
--   (without requiring a Bitraversable instance).
makeBitraverse :: Name -> Q Exp

-- | Generates a lambda expression which behaves like bisequenceA
--   (without requiring a Bitraversable instance).
makeBisequenceA :: Name -> Q Exp

-- | Generates a lambda expression which behaves like bimapM
--   (without requiring a Bitraversable instance).
makeBimapM :: Name -> Q Exp

-- | Generates a lambda expression which behaves like bisequence
--   (without requiring a Bitraversable instance).
makeBisequence :: Name -> Q Exp
instance GHC.Classes.Eq Data.Bifunctor.TH.BiFun

module Data.Biapplicative
class Bifunctor p => Biapplicative p where a *>> b = bimap (const id) (const id) <<$>> a <<*>> b a <<* b = bimap const const <<$>> a <<*>> b
bipure :: Biapplicative p => a -> b -> p a b
(<<*>>) :: Biapplicative p => p (a -> b) (c -> d) -> p a c -> p b d

-- | 
--   a *>> b ≡ bimap (const id) (const id) <<$>> a <<*>> b
--   
(*>>) :: Biapplicative p => p a b -> p c d -> p c d

-- | 
--   a <<* b ≡ bimap const const <<$>> a <<*>> b
--   
(<<*) :: Biapplicative p => p a b -> p c d -> p a b
(<<$>>) :: (a -> b) -> a -> b
infixl 4 <<$>>
(<<**>>) :: Biapplicative p => p a c -> p (a -> b) (c -> d) -> p b d
infixl 4 <<**>>

-- | Lift binary functions
biliftA2 :: Biapplicative w => (a -> b -> c) -> (d -> e -> f) -> w a d -> w b e -> w c f

-- | Lift ternary functions
biliftA3 :: Biapplicative w => (a -> b -> c -> d) -> (e -> f -> g -> h) -> w a e -> w b f -> w c g -> w d h
instance Data.Biapplicative.Biapplicative (,)
instance Data.Biapplicative.Biapplicative Data.Semigroup.Arg
instance GHC.Base.Monoid x => Data.Biapplicative.Biapplicative ((,,) x)
instance (GHC.Base.Monoid x, GHC.Base.Monoid y) => Data.Biapplicative.Biapplicative ((,,,) x y)
instance (GHC.Base.Monoid x, GHC.Base.Monoid y, GHC.Base.Monoid z) => Data.Biapplicative.Biapplicative ((,,,,) x y z)
instance (GHC.Base.Monoid x, GHC.Base.Monoid y, GHC.Base.Monoid z, GHC.Base.Monoid w) => Data.Biapplicative.Biapplicative ((,,,,,) x y z w)
instance (GHC.Base.Monoid x, GHC.Base.Monoid y, GHC.Base.Monoid z, GHC.Base.Monoid w, GHC.Base.Monoid v) => Data.Biapplicative.Biapplicative ((,,,,,,) x y z w v)
instance Data.Biapplicative.Biapplicative Data.Tagged.Tagged
instance Data.Biapplicative.Biapplicative Data.Functor.Const.Const

module Data.Bifunctor.Biff

-- | Compose two Functors on the inside of a Bifunctor.
newtype Biff p f g a b
Biff :: p (f a) (g b) -> Biff p f g a b
[runBiff] :: Biff p f g a b -> p (f a) (g b)
instance forall k k1 (p :: k -> k1 -> *) k2 (f :: k2 -> k) k3 (g :: k3 -> k1) (a :: k2) (b :: k3). GHC.Generics.Generic (Data.Bifunctor.Biff.Biff p f g a b)
instance forall k k1 (p :: k -> k1 -> *) k2 (f :: k2 -> k) k3 (g :: k3 -> k1) (a :: k2) (b :: k3). GHC.Read.Read (p (f a) (g b)) => GHC.Read.Read (Data.Bifunctor.Biff.Biff p f g a b)
instance forall k k1 (p :: k -> k1 -> *) k2 (f :: k2 -> k) k3 (g :: k3 -> k1) (a :: k2) (b :: k3). GHC.Show.Show (p (f a) (g b)) => GHC.Show.Show (Data.Bifunctor.Biff.Biff p f g a b)
instance forall k k1 (p :: k -> k1 -> *) k2 (f :: k2 -> k) k3 (g :: k3 -> k1) (a :: k2) (b :: k3). GHC.Classes.Ord (p (f a) (g b)) => GHC.Classes.Ord (Data.Bifunctor.Biff.Biff p f g a b)
instance forall k k1 (p :: k -> k1 -> *) k2 (f :: k2 -> k) k3 (g :: k3 -> k1) (a :: k2) (b :: k3). GHC.Classes.Eq (p (f a) (g b)) => GHC.Classes.Eq (Data.Bifunctor.Biff.Biff p f g a b)
instance forall k k1 (p :: k1 -> * -> *) (f :: k -> k1) (a :: k) (g :: GHC.Types.* -> *). GHC.Base.Functor (p (f a)) => GHC.Generics.Generic1 (Data.Bifunctor.Biff.Biff p f g a)
instance (Data.Bifunctor.Bifunctor p, GHC.Base.Functor f, GHC.Base.Functor g) => Data.Bifunctor.Bifunctor (Data.Bifunctor.Biff.Biff p f g)
instance forall k (p :: * -> * -> *) (g :: * -> *) (f :: k -> *) (a :: k). (Data.Bifunctor.Bifunctor p, GHC.Base.Functor g) => GHC.Base.Functor (Data.Bifunctor.Biff.Biff p f g a)
instance (Data.Biapplicative.Biapplicative p, GHC.Base.Applicative f, GHC.Base.Applicative g) => Data.Biapplicative.Biapplicative (Data.Bifunctor.Biff.Biff p f g)
instance forall k (p :: * -> * -> *) (g :: * -> *) (f :: k -> *) (a :: k). (Data.Bifoldable.Bifoldable p, Data.Foldable.Foldable g) => Data.Foldable.Foldable (Data.Bifunctor.Biff.Biff p f g a)
instance (Data.Bifoldable.Bifoldable p, Data.Foldable.Foldable f, Data.Foldable.Foldable g) => Data.Bifoldable.Bifoldable (Data.Bifunctor.Biff.Biff p f g)
instance forall k (p :: * -> * -> *) (g :: * -> *) (f :: k -> *) (a :: k). (Data.Bitraversable.Bitraversable p, Data.Traversable.Traversable g) => Data.Traversable.Traversable (Data.Bifunctor.Biff.Biff p f g a)
instance (Data.Bitraversable.Bitraversable p, Data.Traversable.Traversable f, Data.Traversable.Traversable g) => Data.Bitraversable.Bitraversable (Data.Bifunctor.Biff.Biff p f g)

-- | From the Functional Pearl "Clowns to the Left of me, Jokers to the
--   Right: Dissecting Data Structures" by Conor McBride.
module Data.Bifunctor.Clown

-- | Make a Functor over the first argument of a Bifunctor.
--   
--   Mnemonic: Clowns to the left (parameter of the
--   Bifunctor), jokers to the right.
newtype Clown f a b
Clown :: f a -> Clown f a b
[runClown] :: Clown f a b -> f a
instance forall k (f :: k -> *) (a :: k). GHC.Generics.Generic1 (Data.Bifunctor.Clown.Clown f a)
instance forall k (f :: k -> *) (a :: k) k1 (b :: k1). GHC.Generics.Generic (Data.Bifunctor.Clown.Clown f a b)
instance forall k (f :: k -> *) (a :: k) k1 (b :: k1). GHC.Read.Read (f a) => GHC.Read.Read (Data.Bifunctor.Clown.Clown f a b)
instance forall k (f :: k -> *) (a :: k) k1 (b :: k1). GHC.Show.Show (f a) => GHC.Show.Show (Data.Bifunctor.Clown.Clown f a b)
instance forall k (f :: k -> *) (a :: k) k1 (b :: k1). GHC.Classes.Ord (f a) => GHC.Classes.Ord (Data.Bifunctor.Clown.Clown f a b)
instance forall k (f :: k -> *) (a :: k) k1 (b :: k1). GHC.Classes.Eq (f a) => GHC.Classes.Eq (Data.Bifunctor.Clown.Clown f a b)
instance GHC.Base.Functor f => Data.Bifunctor.Bifunctor (Data.Bifunctor.Clown.Clown f)
instance forall k (f :: k -> *) (a :: k). GHC.Base.Functor (Data.Bifunctor.Clown.Clown f a)
instance GHC.Base.Applicative f => Data.Biapplicative.Biapplicative (Data.Bifunctor.Clown.Clown f)
instance Data.Foldable.Foldable f => Data.Bifoldable.Bifoldable (Data.Bifunctor.Clown.Clown f)
instance forall k (f :: k -> *) (a :: k). Data.Foldable.Foldable (Data.Bifunctor.Clown.Clown f a)
instance Data.Traversable.Traversable f => Data.Bitraversable.Bitraversable (Data.Bifunctor.Clown.Clown f)
instance forall k (f :: k -> *) (a :: k). Data.Traversable.Traversable (Data.Bifunctor.Clown.Clown f a)

module Data.Bifunctor.Fix

-- | Greatest fixpoint of a Bifunctor (a Functor over the
--   first argument with zipping).
newtype Fix p a
In :: p (Fix p a) a -> Fix p a
[out] :: Fix p a -> p (Fix p a) a
instance forall k (p :: * -> k -> *) (a :: k). GHC.Generics.Generic (Data.Bifunctor.Fix.Fix p a)
instance forall k (p :: * -> k -> *) (a :: k). GHC.Classes.Eq (p (Data.Bifunctor.Fix.Fix p a) a) => GHC.Classes.Eq (Data.Bifunctor.Fix.Fix p a)
instance forall k (p :: * -> k -> *) (a :: k). GHC.Classes.Ord (p (Data.Bifunctor.Fix.Fix p a) a) => GHC.Classes.Ord (Data.Bifunctor.Fix.Fix p a)
instance forall k (p :: * -> k -> *) (a :: k). GHC.Show.Show (p (Data.Bifunctor.Fix.Fix p a) a) => GHC.Show.Show (Data.Bifunctor.Fix.Fix p a)
instance forall k (p :: * -> k -> *) (a :: k). GHC.Read.Read (p (Data.Bifunctor.Fix.Fix p a) a) => GHC.Read.Read (Data.Bifunctor.Fix.Fix p a)
instance Data.Bifunctor.Bifunctor p => GHC.Base.Functor (Data.Bifunctor.Fix.Fix p)
instance Data.Biapplicative.Biapplicative p => GHC.Base.Applicative (Data.Bifunctor.Fix.Fix p)
instance Data.Bifoldable.Bifoldable p => Data.Foldable.Foldable (Data.Bifunctor.Fix.Fix p)
instance Data.Bitraversable.Bitraversable p => Data.Traversable.Traversable (Data.Bifunctor.Fix.Fix p)

module Data.Bifunctor.Flip

-- | Make a Bifunctor flipping the arguments of a Bifunctor.
newtype Flip p a b
Flip :: p b a -> Flip p a b
[runFlip] :: Flip p a b -> p b a
instance forall k k1 (p :: k1 -> k -> *) (a :: k) (b :: k1). GHC.Generics.Generic (Data.Bifunctor.Flip.Flip p a b)
instance forall k k1 (p :: k1 -> k -> *) (a :: k) (b :: k1). GHC.Read.Read (p b a) => GHC.Read.Read (Data.Bifunctor.Flip.Flip p a b)
instance forall k k1 (p :: k1 -> k -> *) (a :: k) (b :: k1). GHC.Show.Show (p b a) => GHC.Show.Show (Data.Bifunctor.Flip.Flip p a b)
instance forall k k1 (p :: k1 -> k -> *) (a :: k) (b :: k1). GHC.Classes.Ord (p b a) => GHC.Classes.Ord (Data.Bifunctor.Flip.Flip p a b)
instance forall k k1 (p :: k1 -> k -> *) (a :: k) (b :: k1). GHC.Classes.Eq (p b a) => GHC.Classes.Eq (Data.Bifunctor.Flip.Flip p a b)
instance Data.Bifunctor.Bifunctor p => Data.Bifunctor.Bifunctor (Data.Bifunctor.Flip.Flip p)
instance Data.Bifunctor.Bifunctor p => GHC.Base.Functor (Data.Bifunctor.Flip.Flip p a)
instance Data.Biapplicative.Biapplicative p => Data.Biapplicative.Biapplicative (Data.Bifunctor.Flip.Flip p)
instance Data.Bifoldable.Bifoldable p => Data.Bifoldable.Bifoldable (Data.Bifunctor.Flip.Flip p)
instance Data.Bifoldable.Bifoldable p => Data.Foldable.Foldable (Data.Bifunctor.Flip.Flip p a)
instance Data.Bitraversable.Bitraversable p => Data.Bitraversable.Bitraversable (Data.Bifunctor.Flip.Flip p)
instance Data.Bitraversable.Bitraversable p => Data.Traversable.Traversable (Data.Bifunctor.Flip.Flip p a)
instance Data.Bifunctor.Functor.BifunctorFunctor Data.Bifunctor.Flip.Flip

module Data.Bifunctor.Join

-- | Make a Functor over both arguments of a Bifunctor.
newtype Join p a
Join :: p a a -> Join p a
[runJoin] :: Join p a -> p a a
instance forall k (p :: k -> k -> *) (a :: k). GHC.Generics.Generic (Data.Bifunctor.Join.Join p a)
instance forall k (p :: k -> k -> *) (a :: k). GHC.Classes.Eq (p a a) => GHC.Classes.Eq (Data.Bifunctor.Join.Join p a)
instance forall k (p :: k -> k -> *) (a :: k). GHC.Classes.Ord (p a a) => GHC.Classes.Ord (Data.Bifunctor.Join.Join p a)
instance forall k (p :: k -> k -> *) (a :: k). GHC.Show.Show (p a a) => GHC.Show.Show (Data.Bifunctor.Join.Join p a)
instance forall k (p :: k -> k -> *) (a :: k). GHC.Read.Read (p a a) => GHC.Read.Read (Data.Bifunctor.Join.Join p a)
instance Data.Bifunctor.Bifunctor p => GHC.Base.Functor (Data.Bifunctor.Join.Join p)
instance Data.Biapplicative.Biapplicative p => GHC.Base.Applicative (Data.Bifunctor.Join.Join p)
instance Data.Bifoldable.Bifoldable p => Data.Foldable.Foldable (Data.Bifunctor.Join.Join p)
instance Data.Bitraversable.Bitraversable p => Data.Traversable.Traversable (Data.Bifunctor.Join.Join p)

-- | From the Functional Pearl "Clowns to the Left of me, Jokers to the
--   Right: Dissecting Data Structures" by Conor McBride.
module Data.Bifunctor.Joker

-- | Make a Functor over the second argument of a Bifunctor.
--   
--   Mnemonic: Clowns to the left (parameter of the
--   Bifunctor), jokers to the right.
newtype Joker g a b
Joker :: g b -> Joker g a b
[runJoker] :: Joker g a b -> g b
instance forall (g :: * -> *) k (a :: k). GHC.Generics.Generic1 (Data.Bifunctor.Joker.Joker g a)
instance forall k (g :: k -> *) k1 (a :: k1) (b :: k). GHC.Generics.Generic (Data.Bifunctor.Joker.Joker g a b)
instance forall k (g :: k -> *) k1 (a :: k1) (b :: k). GHC.Read.Read (g b) => GHC.Read.Read (Data.Bifunctor.Joker.Joker g a b)
instance forall k (g :: k -> *) k1 (a :: k1) (b :: k). GHC.Show.Show (g b) => GHC.Show.Show (Data.Bifunctor.Joker.Joker g a b)
instance forall k (g :: k -> *) k1 (a :: k1) (b :: k). GHC.Classes.Ord (g b) => GHC.Classes.Ord (Data.Bifunctor.Joker.Joker g a b)
instance forall k (g :: k -> *) k1 (a :: k1) (b :: k). GHC.Classes.Eq (g b) => GHC.Classes.Eq (Data.Bifunctor.Joker.Joker g a b)
instance GHC.Base.Functor g => Data.Bifunctor.Bifunctor (Data.Bifunctor.Joker.Joker g)
instance forall k (g :: * -> *) (a :: k). GHC.Base.Functor g => GHC.Base.Functor (Data.Bifunctor.Joker.Joker g a)
instance GHC.Base.Applicative g => Data.Biapplicative.Biapplicative (Data.Bifunctor.Joker.Joker g)
instance Data.Foldable.Foldable g => Data.Bifoldable.Bifoldable (Data.Bifunctor.Joker.Joker g)
instance forall k (g :: * -> *) (a :: k). Data.Foldable.Foldable g => Data.Foldable.Foldable (Data.Bifunctor.Joker.Joker g a)
instance Data.Traversable.Traversable g => Data.Bitraversable.Bitraversable (Data.Bifunctor.Joker.Joker g)
instance forall k (g :: * -> *) (a :: k). Data.Traversable.Traversable g => Data.Traversable.Traversable (Data.Bifunctor.Joker.Joker g a)

-- | The product of two bifunctors.
module Data.Bifunctor.Product

-- | Form the product of two bifunctors
data Product f g a b
Pair :: (f a b) -> (g a b) -> Product f g a b
instance forall k (f :: k -> * -> *) (g :: k -> * -> *) (a :: k). GHC.Generics.Generic1 (Data.Bifunctor.Product.Product f g a)
instance forall k k1 (f :: k -> k1 -> *) (g :: k -> k1 -> *) (a :: k) (b :: k1). GHC.Generics.Generic (Data.Bifunctor.Product.Product f g a b)
instance forall k k1 (f :: k -> k1 -> *) (g :: k -> k1 -> *) (a :: k) (b :: k1). (GHC.Read.Read (g a b), GHC.Read.Read (f a b)) => GHC.Read.Read (Data.Bifunctor.Product.Product f g a b)
instance forall k k1 (f :: k -> k1 -> *) (g :: k -> k1 -> *) (a :: k) (b :: k1). (GHC.Show.Show (g a b), GHC.Show.Show (f a b)) => GHC.Show.Show (Data.Bifunctor.Product.Product f g a b)
instance forall k k1 (f :: k -> k1 -> *) (g :: k -> k1 -> *) (a :: k) (b :: k1). (GHC.Classes.Ord (g a b), GHC.Classes.Ord (f a b)) => GHC.Classes.Ord (Data.Bifunctor.Product.Product f g a b)
instance forall k k1 (f :: k -> k1 -> *) (g :: k -> k1 -> *) (a :: k) (b :: k1). (GHC.Classes.Eq (g a b), GHC.Classes.Eq (f a b)) => GHC.Classes.Eq (Data.Bifunctor.Product.Product f g a b)
instance (Data.Bifunctor.Bifunctor f, Data.Bifunctor.Bifunctor g) => Data.Bifunctor.Bifunctor (Data.Bifunctor.Product.Product f g)
instance (Data.Biapplicative.Biapplicative f, Data.Biapplicative.Biapplicative g) => Data.Biapplicative.Biapplicative (Data.Bifunctor.Product.Product f g)
instance (Data.Bifoldable.Bifoldable f, Data.Bifoldable.Bifoldable g) => Data.Bifoldable.Bifoldable (Data.Bifunctor.Product.Product f g)
instance (Data.Bitraversable.Bitraversable f, Data.Bitraversable.Bitraversable g) => Data.Bitraversable.Bitraversable (Data.Bifunctor.Product.Product f g)
instance forall k k1 (p :: k1 -> k -> *). Data.Bifunctor.Functor.BifunctorFunctor (Data.Bifunctor.Product.Product p)
instance forall k k1 (p :: k1 -> k -> *). Data.Bifunctor.Functor.BifunctorComonad (Data.Bifunctor.Product.Product p)

module Data.Bifunctor.Tannen

-- | Compose a Functor on the outside of a Bifunctor.
newtype Tannen f p a b
Tannen :: f (p a b) -> Tannen f p a b
[runTannen] :: Tannen f p a b -> f (p a b)
instance forall k (f :: k -> *) k1 k2 (p :: k1 -> k2 -> k) (a :: k1) (b :: k2). GHC.Generics.Generic (Data.Bifunctor.Tannen.Tannen f p a b)
instance forall k (f :: k -> *) k1 k2 (p :: k1 -> k2 -> k) (a :: k1) (b :: k2). GHC.Read.Read (f (p a b)) => GHC.Read.Read (Data.Bifunctor.Tannen.Tannen f p a b)
instance forall k (f :: k -> *) k1 k2 (p :: k1 -> k2 -> k) (a :: k1) (b :: k2). GHC.Show.Show (f (p a b)) => GHC.Show.Show (Data.Bifunctor.Tannen.Tannen f p a b)
instance forall k (f :: k -> *) k1 k2 (p :: k1 -> k2 -> k) (a :: k1) (b :: k2). GHC.Classes.Ord (f (p a b)) => GHC.Classes.Ord (Data.Bifunctor.Tannen.Tannen f p a b)
instance forall k (f :: k -> *) k1 k2 (p :: k1 -> k2 -> k) (a :: k1) (b :: k2). GHC.Classes.Eq (f (p a b)) => GHC.Classes.Eq (Data.Bifunctor.Tannen.Tannen f p a b)
instance forall k (f :: * -> *) (p :: k -> GHC.Types.* -> *) (a :: k). GHC.Base.Functor f => GHC.Generics.Generic1 (Data.Bifunctor.Tannen.Tannen f p a)
instance GHC.Base.Functor f => Data.Bifunctor.Functor.BifunctorFunctor (Data.Bifunctor.Tannen.Tannen f)
instance (GHC.Base.Functor f, GHC.Base.Monad f) => Data.Bifunctor.Functor.BifunctorMonad (Data.Bifunctor.Tannen.Tannen f)
instance Control.Comonad.Comonad f => Data.Bifunctor.Functor.BifunctorComonad (Data.Bifunctor.Tannen.Tannen f)
instance (GHC.Base.Functor f, Data.Bifunctor.Bifunctor p) => Data.Bifunctor.Bifunctor (Data.Bifunctor.Tannen.Tannen f p)
instance (GHC.Base.Functor f, Data.Bifunctor.Bifunctor p) => GHC.Base.Functor (Data.Bifunctor.Tannen.Tannen f p a)
instance (GHC.Base.Applicative f, Data.Biapplicative.Biapplicative p) => Data.Biapplicative.Biapplicative (Data.Bifunctor.Tannen.Tannen f p)
instance (Data.Foldable.Foldable f, Data.Bifoldable.Bifoldable p) => Data.Foldable.Foldable (Data.Bifunctor.Tannen.Tannen f p a)
instance (Data.Foldable.Foldable f, Data.Bifoldable.Bifoldable p) => Data.Bifoldable.Bifoldable (Data.Bifunctor.Tannen.Tannen f p)
instance (Data.Traversable.Traversable f, Data.Bitraversable.Bitraversable p) => Data.Traversable.Traversable (Data.Bifunctor.Tannen.Tannen f p a)
instance (Data.Traversable.Traversable f, Data.Bitraversable.Bitraversable p) => Data.Bitraversable.Bitraversable (Data.Bifunctor.Tannen.Tannen f p)
instance forall k (f :: * -> *) (p :: k -> k -> *). (GHC.Base.Applicative f, Control.Category.Category p) => Control.Category.Category (Data.Bifunctor.Tannen.Tannen f p)
instance (GHC.Base.Applicative f, Control.Arrow.Arrow p) => Control.Arrow.Arrow (Data.Bifunctor.Tannen.Tannen f p)
instance (GHC.Base.Applicative f, Control.Arrow.ArrowChoice p) => Control.Arrow.ArrowChoice (Data.Bifunctor.Tannen.Tannen f p)
instance (GHC.Base.Applicative f, Control.Arrow.ArrowLoop p) => Control.Arrow.ArrowLoop (Data.Bifunctor.Tannen.Tannen f p)
instance (GHC.Base.Applicative f, Control.Arrow.ArrowZero p) => Control.Arrow.ArrowZero (Data.Bifunctor.Tannen.Tannen f p)
instance (GHC.Base.Applicative f, Control.Arrow.ArrowPlus p) => Control.Arrow.ArrowPlus (Data.Bifunctor.Tannen.Tannen f p)

module Data.Bifunctor.Wrapped

-- | Make a Functor over the second argument of a Bifunctor.
newtype WrappedBifunctor p a b
WrapBifunctor :: p a b -> WrappedBifunctor p a b
[unwrapBifunctor] :: WrappedBifunctor p a b -> p a b
instance forall k (p :: k -> * -> *) (a :: k). GHC.Generics.Generic1 (Data.Bifunctor.Wrapped.WrappedBifunctor p a)
instance forall k k1 (p :: k -> k1 -> *) (a :: k) (b :: k1). GHC.Generics.Generic (Data.Bifunctor.Wrapped.WrappedBifunctor p a b)
instance forall k k1 (p :: k -> k1 -> *) (a :: k) (b :: k1). GHC.Read.Read (p a b) => GHC.Read.Read (Data.Bifunctor.Wrapped.WrappedBifunctor p a b)
instance forall k k1 (p :: k -> k1 -> *) (a :: k) (b :: k1). GHC.Show.Show (p a b) => GHC.Show.Show (Data.Bifunctor.Wrapped.WrappedBifunctor p a b)
instance forall k k1 (p :: k -> k1 -> *) (a :: k) (b :: k1). GHC.Classes.Ord (p a b) => GHC.Classes.Ord (Data.Bifunctor.Wrapped.WrappedBifunctor p a b)
instance forall k k1 (p :: k -> k1 -> *) (a :: k) (b :: k1). GHC.Classes.Eq (p a b) => GHC.Classes.Eq (Data.Bifunctor.Wrapped.WrappedBifunctor p a b)
instance Data.Bifunctor.Bifunctor p => Data.Bifunctor.Bifunctor (Data.Bifunctor.Wrapped.WrappedBifunctor p)
instance Data.Bifunctor.Bifunctor p => GHC.Base.Functor (Data.Bifunctor.Wrapped.WrappedBifunctor p a)
instance Data.Biapplicative.Biapplicative p => Data.Biapplicative.Biapplicative (Data.Bifunctor.Wrapped.WrappedBifunctor p)
instance Data.Bifoldable.Bifoldable p => Data.Foldable.Foldable (Data.Bifunctor.Wrapped.WrappedBifunctor p a)
instance Data.Bifoldable.Bifoldable p => Data.Bifoldable.Bifoldable (Data.Bifunctor.Wrapped.WrappedBifunctor p)
instance Data.Bitraversable.Bitraversable p => Data.Traversable.Traversable (Data.Bifunctor.Wrapped.WrappedBifunctor p a)
instance Data.Bitraversable.Bitraversable p => Data.Bitraversable.Bitraversable (Data.Bifunctor.Wrapped.WrappedBifunctor p)
