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

-- | Bifunctors
--   
--   Bifunctors
@package bifunctors
@version 5.1

-- | 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.Bifoldable

-- | Minimal definition either bifoldr or bifoldMap
--   
--   Bifoldable identifies foldable structures with two different
--   varieties of elements. 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)
--   
--   
--   When defining more than the minimal set of definitions, 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
--   
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
--   
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

-- | 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 reductionf unctions
--   at each step.
bifoldl' :: Bifoldable t => (a -> b -> a) -> (a -> c -> a) -> a -> t b c -> 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

-- | As bitraverse, but ignores the results of the functions, merely
--   performing the "actions".
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.
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 ()

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

-- | As bisequence, but ignores the results of the actions.
bisequence_ :: (Bifoldable t, Monad m) => t (m a) (m b) -> m ()

-- | Collects the list of elements of a structure in order.
biList :: Bifoldable t => 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]

-- | 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
instance Data.Bifoldable.Bifoldable Data.Semigroup.Arg
instance Data.Bifoldable.Bifoldable (,)
instance Data.Bifoldable.Bifoldable Control.Applicative.Const
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

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.
--   
--   A definition of traverse 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
--   
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.
--   
--   
--   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.
--   
--   
--   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.
--   
--   
--   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.
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.
biforM :: (Bitraversable t, Monad m) => t a b -> (a -> m c) -> (b -> m d) -> m (t c d)

-- | 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)

-- | 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 :: Bitraversable t => (a -> b) -> (c -> d) -> t a c -> t b d

-- | A default definition of bifoldMap in terms of the
--   Bitraversable operations.
bifoldMapDefault :: (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 Control.Applicative.Const
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)
instance GHC.Base.Functor Data.Bitraversable.Id
instance GHC.Base.Applicative Data.Bitraversable.Id

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
(<<**>>) :: Biapplicative p => p a c -> p (a -> b) (c -> d) -> p b d

-- | 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 Control.Applicative.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 GHC.Read.Read (p (f a) (g b)) => GHC.Read.Read (Data.Bifunctor.Biff.Biff p f g a b)
instance GHC.Show.Show (p (f a) (g b)) => GHC.Show.Show (Data.Bifunctor.Biff.Biff p f g a b)
instance GHC.Classes.Ord (p (f a) (g b)) => GHC.Classes.Ord (Data.Bifunctor.Biff.Biff p f g a b)
instance GHC.Classes.Eq (p (f a) (g b)) => GHC.Classes.Eq (Data.Bifunctor.Biff.Biff p f g a b)
instance (Data.Bifunctor.Bifunctor p, GHC.Base.Functor f, GHC.Base.Functor g) => Data.Bifunctor.Bifunctor (Data.Bifunctor.Biff.Biff p f g)
instance (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 (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 (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 GHC.Read.Read (f a) => GHC.Read.Read (Data.Bifunctor.Clown.Clown f a b)
instance GHC.Show.Show (f a) => GHC.Show.Show (Data.Bifunctor.Clown.Clown f a b)
instance GHC.Classes.Ord (f a) => GHC.Classes.Ord (Data.Bifunctor.Clown.Clown f a b)
instance 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 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 Data.Foldable.Foldable (Data.Bifunctor.Clown.Clown f a)
instance Data.Traversable.Traversable f => Data.Bitraversable.Bitraversable (Data.Bifunctor.Clown.Clown f)
instance 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 GHC.Classes.Eq (p (Data.Bifunctor.Fix.Fix p a) a) => GHC.Classes.Eq (Data.Bifunctor.Fix.Fix p a)
instance GHC.Classes.Ord (p (Data.Bifunctor.Fix.Fix p a) a) => GHC.Classes.Ord (Data.Bifunctor.Fix.Fix p a)
instance GHC.Show.Show (p (Data.Bifunctor.Fix.Fix p a) a) => GHC.Show.Show (Data.Bifunctor.Fix.Fix p a)
instance 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 GHC.Read.Read (p b a) => GHC.Read.Read (Data.Bifunctor.Flip.Flip p a b)
instance GHC.Show.Show (p b a) => GHC.Show.Show (Data.Bifunctor.Flip.Flip p a b)
instance GHC.Classes.Ord (p b a) => GHC.Classes.Ord (Data.Bifunctor.Flip.Flip p a b)
instance 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)

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 GHC.Classes.Eq (p a a) => GHC.Classes.Eq (Data.Bifunctor.Join.Join p a)
instance GHC.Classes.Ord (p a a) => GHC.Classes.Ord (Data.Bifunctor.Join.Join p a)
instance GHC.Show.Show (p a a) => GHC.Show.Show (Data.Bifunctor.Join.Join p a)
instance 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 GHC.Read.Read (g b) => GHC.Read.Read (Data.Bifunctor.Joker.Joker g a b)
instance GHC.Show.Show (g b) => GHC.Show.Show (Data.Bifunctor.Joker.Joker g a b)
instance GHC.Classes.Ord (g b) => GHC.Classes.Ord (Data.Bifunctor.Joker.Joker g a b)
instance 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 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 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 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 (GHC.Read.Read (f a b), GHC.Read.Read (g a b)) => GHC.Read.Read (Data.Bifunctor.Product.Product f g a b)
instance (GHC.Show.Show (f a b), GHC.Show.Show (g a b)) => GHC.Show.Show (Data.Bifunctor.Product.Product f g a b)
instance (GHC.Classes.Ord (f a b), GHC.Classes.Ord (g a b)) => GHC.Classes.Ord (Data.Bifunctor.Product.Product f g a b)
instance (GHC.Classes.Eq (f a b), GHC.Classes.Eq (g 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)

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 GHC.Read.Read (f (p a b)) => GHC.Read.Read (Data.Bifunctor.Tannen.Tannen f p a b)
instance GHC.Show.Show (f (p a b)) => GHC.Show.Show (Data.Bifunctor.Tannen.Tannen f p a b)
instance GHC.Classes.Ord (f (p a b)) => GHC.Classes.Ord (Data.Bifunctor.Tannen.Tannen f p a b)
instance GHC.Classes.Eq (f (p a b)) => GHC.Classes.Eq (Data.Bifunctor.Tannen.Tannen f p a b)
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)

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 GHC.Read.Read (p a b) => GHC.Read.Read (Data.Bifunctor.Wrapped.WrappedBifunctor p a b)
instance GHC.Show.Show (p a b) => GHC.Show.Show (Data.Bifunctor.Wrapped.WrappedBifunctor p a b)
instance GHC.Classes.Ord (p a b) => GHC.Classes.Ord (Data.Bifunctor.Wrapped.WrappedBifunctor p a b)
instance 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)
