    -- | Import this module qualified, like this:
    --
    -- > import qualified Rank2
    --
    -- This will bring into scope the standard classes 'Functor', 'Applicative', 'Foldable', and 'Traversable', but with a
    -- @Rank2.@ prefix and a twist that their methods operate on a heterogenous collection. The same property is shared by
    -- the two less standard classes 'Apply' and 'Distributive'.
    {-# LANGUAGE DefaultSignatures, InstanceSigs, KindSignatures, PolyKinds, Rank2Types #-}
    {-# LANGUAGE ScopedTypeVariables, TypeOperators #-}
    {-# LANGUAGE EmptyCase #-}
    module Rank2 (
    -- * Rank 2 classes
       Functor(..), Apply(..), Applicative(..),
       Foldable(..), Traversable(..), Distributive(..), DistributiveTraversable(..), distributeJoin,
    -- * Rank 2 data types
       Compose(..), Empty(..), Only(..), Flip(..), Identity(..), Product(..), Sum(..), Arrow(..), type (~>),
    -- * Method synonyms and helper functions
       ($), fst, snd, ap, fmap, liftA4, liftA5,
       fmapTraverse, liftA2Traverse1, liftA2Traverse2, liftA2TraverseBoth,
       distributeWith, distributeWithTraversable)
    where

    import qualified Control.Applicative as Rank1
    import qualified Control.Monad as Rank1
    import qualified Data.Foldable as Rank1
    import qualified Data.Traversable as Rank1
    import Data.Coerce (coerce)
    import Data.Semigroup (Semigroup(..))
    import Data.Monoid (Monoid(..))
    import Data.Functor.Compose (Compose(Compose, getCompose))
    import Data.Functor.Const (Const(..))
    import Data.Functor.Product (Product(Pair))
    import Data.Functor.Sum (Sum(InL, InR))
    import Data.Proxy (Proxy(..))
    import qualified GHC.Generics as Generics

    import Prelude hiding (Foldable(..), Traversable(..), Functor(..), Applicative(..), ($), (<$>), fst, snd)

    -- | Helper function for accessing the first field of a 'Pair'
    fst :: Product g h p -> g p
    fst :: Product g h p -> g p
    fst (Pair x :: g p
    x _) = g p
    x

    -- | Helper function for accessing the second field of a 'Pair'
    snd :: Product g h p -> h p
    snd :: Product g h p -> h p
    snd (Pair _ y :: h p
    y) = h p
    y

    -- | Equivalent of 'Functor' for rank 2 data types, satisfying the usual functor laws
    --
    -- > id <$> g == g
    -- > (p . q) <$> g == p <$> (q <$> g)
    class Functor g where
       (<$>) :: (forall a. p a -> q a) -> g p -> g q

    -- | Alphabetical synonym for '<$>'
    fmap :: Functor g => (forall a. p a -> q a) -> g p -> g q
    fmap :: (forall (a :: k). p a -> q a) -> g p -> g q
    fmap f :: forall (a :: k). p a -> q a
    f g :: g p
    g = forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> g p
    g
    {-# INLINE fmap #-}

    -- | Equivalent of 'Foldable' for rank 2 data types
    class Foldable g where
       foldMap :: Monoid m => (forall a. p a -> m) -> g p -> m

    -- | Equivalent of 'Traversable' for rank 2 data types
    class (Functor g, Foldable g) => Traversable g where
       {-# MINIMAL traverse | sequence #-}
       traverse :: Rank1.Applicative m => (forall a. p a -> m (q a)) -> g p -> m (g q)
       sequence :: Rank1.Applicative m => g (Compose m p) -> m (g p)
       traverse f :: forall (a :: k). p a -> m (q a)
    f = g (Compose m q) -> m (g q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *).
    (Traversable g, Applicative m) =>
    g (Compose m p) -> m (g p)
    sequence (g (Compose m q) -> m (g q))
    -> (g p -> g (Compose m q)) -> g p -> m (g q)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (forall (a :: k). p a -> Compose m q a) -> g p -> g (Compose m q)
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    fmap (m (q a) -> Compose m q a
    forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1).
    f (g a) -> Compose f g a
    Compose (m (q a) -> Compose m q a)
    -> (p a -> m (q a)) -> p a -> Compose m q a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . p a -> m (q a)
    forall (a :: k). p a -> m (q a)
    f)
       sequence = (forall (a :: k). Compose m p a -> m (p a))
    -> g (Compose m p) -> m (g p)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). Compose m p a -> m (p a)
    forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2).
    Compose f g a -> f (g a)
    getCompose

    -- | Wrapper for functions that map the argument constructor type
    newtype Arrow p q a = Arrow{Arrow p q a -> p a -> q a
    apply :: p a -> q a}

    type (~>) = Arrow
    ($) :: Arrow p q a -> p a -> q a
    $ :: Arrow p q a -> p a -> q a
    ($) = Arrow p q a -> p a -> q a
    forall k (p :: k -> *) (q :: k -> *) (a :: k).
    Arrow p q a -> p a -> q a
    apply
    infixr 0 ~>
    infixr 0 $

    -- | Subclass of 'Functor' halfway to 'Applicative', satisfying
    --
    -- > (.) <$> u <*> v <*> w == u <*> (v <*> w)
    class Functor g => Apply g where
       {-# MINIMAL liftA2 | (<*>) #-}
       -- | Equivalent of 'Rank1.<*>' for rank 2 data types
       (<*>) :: g (p ~> q) -> g p -> g q
       -- | Equivalent of 'Rank1.liftA2' for rank 2 data types
       liftA2 :: (forall a. p a -> q a -> r a) -> g p -> g q -> g r
       -- | Equivalent of 'Rank1.liftA3' for rank 2 data types
       liftA3 :: (forall a. p a -> q a -> r a -> s a) -> g p -> g q -> g r -> g s

       (<*>) = (forall (a :: k). (~>) p q a -> p a -> q a)
    -> g (p ~> q) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    liftA2 forall (a :: k). (~>) p q a -> p a -> q a
    forall k (p :: k -> *) (q :: k -> *) (a :: k).
    Arrow p q a -> p a -> q a
    apply
       liftA2 f :: forall (a :: k). p a -> q a -> r a
    f g :: g p
    g h :: g q
    h = ((q a -> r a) -> Arrow q r a
    forall k (p :: k -> *) (q :: k -> *) (a :: k).
    (p a -> q a) -> Arrow p q a
    Arrow ((q a -> r a) -> Arrow q r a)
    -> (p a -> q a -> r a) -> p a -> Arrow q r a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . p a -> q a -> r a
    forall (a :: k). p a -> q a -> r a
    f) (forall (a :: k). p a -> Arrow q r a) -> g p -> g (q ~> r)
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> g p
    g g (q ~> r) -> g q -> g r
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> g q
    h
       liftA3 f :: forall (a :: k). p a -> q a -> r a -> s a
    f g :: g p
    g h :: g q
    h i :: g r
    i = (forall (a :: k). p a -> q a -> (~>) r s a)
    -> g p -> g q -> g (r ~> s)
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    liftA2 (\p :: p a
    p q :: q a
    q-> (r a -> s a) -> Arrow r s a
    forall k (p :: k -> *) (q :: k -> *) (a :: k).
    (p a -> q a) -> Arrow p q a
    Arrow (p a -> q a -> r a -> s a
    forall (a :: k). p a -> q a -> r a -> s a
    f p a
    p q a
    q)) g p
    g g q
    h g (r ~> s) -> g r -> g s
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> g r
    i

    liftA4 :: Apply g => (forall a. p a -> q a -> r a -> s a -> t a) -> g p -> g q -> g r -> g s -> g t
    liftA4 :: (forall (a :: k). p a -> q a -> r a -> s a -> t a)
    -> g p -> g q -> g r -> g s -> g t
    liftA4 f :: forall (a :: k). p a -> q a -> r a -> s a -> t a
    f g :: g p
    g h :: g q
    h i :: g r
    i j :: g s
    j = (forall (a :: k). p a -> q a -> r a -> (~>) s t a)
    -> g p -> g q -> g r -> g (s ~> t)
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *) (s :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a -> s a)
    -> g p -> g q -> g r -> g s
    liftA3 (\p :: p a
    p q :: q a
    q r :: r a
    r-> (s a -> t a) -> Arrow s t a
    forall k (p :: k -> *) (q :: k -> *) (a :: k).
    (p a -> q a) -> Arrow p q a
    Arrow (p a -> q a -> r a -> s a -> t a
    forall (a :: k). p a -> q a -> r a -> s a -> t a
    f p a
    p q a
    q r a
    r)) g p
    g g q
    h g r
    i g (s ~> t) -> g s -> g t
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> g s
    j

    liftA5 :: Apply g => (forall a. p a -> q a -> r a -> s a -> t a -> u a) -> g p -> g q -> g r -> g s -> g t -> g u
    liftA5 :: (forall (a :: k). p a -> q a -> r a -> s a -> t a -> u a)
    -> g p -> g q -> g r -> g s -> g t -> g u
    liftA5 f :: forall (a :: k). p a -> q a -> r a -> s a -> t a -> u a
    f g1 :: g p
    g1 g2 :: g q
    g2 g3 :: g r
    g3 g4 :: g s
    g4 g5 :: g t
    g5 = (forall (a :: k). p a -> q a -> r a -> s a -> (~>) t u a)
    -> g p -> g q -> g r -> g s -> g (t ~> u)
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *) (s :: k -> *) (t :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a -> s a -> t a)
    -> g p -> g q -> g r -> g s -> g t
    liftA4 (\p :: p a
    p q :: q a
    q r :: r a
    r s :: s a
    s-> (t a -> u a) -> Arrow t u a
    forall k (p :: k -> *) (q :: k -> *) (a :: k).
    (p a -> q a) -> Arrow p q a
    Arrow (p a -> q a -> r a -> s a -> t a -> u a
    forall (a :: k). p a -> q a -> r a -> s a -> t a -> u a
    f p a
    p q a
    q r a
    r s a
    s)) g p
    g1 g q
    g2 g r
    g3 g s
    g4 g (t ~> u) -> g t -> g u
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> g t
    g5

    -- | Alphabetical synonym for '<*>'
    ap :: Apply g => g (p ~> q) -> g p -> g q
    ap :: g (p ~> q) -> g p -> g q
    ap = g (p ~> q) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    (<*>)

    -- | Equivalent of 'Rank1.Applicative' for rank 2 data types
    class Apply g => Applicative g where
       pure :: (forall a. f a) -> g f

    -- | Equivalent of 'Rank1.Distributive' for rank 2 data types
    class DistributiveTraversable g => Distributive g where
       {-# MINIMAL cotraverse|distribute #-}
       collect :: Rank1.Functor f1 => (a -> g f2) -> f1 a -> g (Compose f1 f2)
       distribute :: Rank1.Functor f1 => f1 (g f2) -> g (Compose f1 f2)
       -- | Dual of 'traverse', equivalent of 'Rank1.cotraverse' for rank 2 data types
       cotraverse :: Rank1.Functor m => (forall a. m (p a) -> q a) -> m (g p) -> g q

       collect f :: a -> g f2
    f = f1 (g f2) -> g (Compose f1 f2)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *).
    (Distributive g, Functor f1) =>
    f1 (g f2) -> g (Compose f1 f2)
    distribute (f1 (g f2) -> g (Compose f1 f2))
    -> (f1 a -> f1 (g f2)) -> f1 a -> g (Compose f1 f2)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> g f2) -> f1 a -> f1 (g f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap a -> g f2
    f
       distribute = (forall (a :: k). f1 (f2 a) -> Compose f1 f2 a)
    -> f1 (g f2) -> g (Compose f1 f2)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall (a :: k). f1 (f2 a) -> Compose f1 f2 a
    forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1).
    f (g a) -> Compose f g a
    Compose
       cotraverse f :: forall (a :: k). m (p a) -> q a
    f = ((forall (a :: k). Compose m p a -> q a) -> g (Compose m p) -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    fmap (m (p a) -> q a
    forall (a :: k). m (p a) -> q a
    f (m (p a) -> q a)
    -> (Compose m p a -> m (p a)) -> Compose m p a -> q a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Compose m p a -> m (p a)
    forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2).
    Compose f g a -> f (g a)
    getCompose)) (g (Compose m p) -> g q)
    -> (m (g p) -> g (Compose m p)) -> m (g p) -> g q
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . m (g p) -> g (Compose m p)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *).
    (Distributive g, Functor f1) =>
    f1 (g f2) -> g (Compose f1 f2)
    distribute

    -- | A weaker 'Distributive' that requires 'Rank1.Traversable' to use, not just a 'Rank1.Functor'.
    class Functor g => DistributiveTraversable (g :: (k -> *) -> *) where
       collectTraversable :: Rank1.Traversable f1 => (a -> g f2) -> f1 a -> g (Compose f1 f2)
       distributeTraversable :: Rank1.Traversable f1 => f1 (g f2) -> g (Compose f1 f2)
       cotraverseTraversable :: Rank1.Traversable f1 => (forall x. f1 (f2 x) -> f x) -> f1 (g f2) -> g f

       collectTraversable f :: a -> g f2
    f = f1 (g f2) -> g (Compose f1 f2)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    f1 (g f2) -> g (Compose f1 f2)
    distributeTraversable (f1 (g f2) -> g (Compose f1 f2))
    -> (f1 a -> f1 (g f2)) -> f1 a -> g (Compose f1 f2)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> g f2) -> f1 a -> f1 (g f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap a -> g f2
    f
       distributeTraversable = (forall (x :: k). f1 (f2 x) -> Compose f1 f2 x)
    -> f1 (g f2) -> g (Compose f1 f2)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable forall (x :: k). f1 (f2 x) -> Compose f1 f2 x
    forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1).
    f (g a) -> Compose f g a
    Compose

       default cotraverseTraversable :: (Rank1.Traversable m, Distributive g) =>
                                        (forall a. m (p a) -> q a) -> m (g p) -> g q
       cotraverseTraversable = (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse

    -- | A variant of 'distribute' convenient with 'Rank1.Monad' instances
    distributeJoin :: (Distributive g, Rank1.Monad f) => f (g f) -> g f
    distributeJoin :: f (g f) -> g f
    distributeJoin = (forall a. f (f a) -> f a) -> f (g f) -> g f
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall a. f (f a) -> f a
    forall (m :: * -> *) a. Monad m => m (m a) -> m a
    Rank1.join

    -- | Like 'fmap', but traverses over its argument
    fmapTraverse :: (DistributiveTraversable g, Rank1.Traversable f) => (forall a. f (t a) -> u a) -> f (g t) -> g u
    fmapTraverse :: (forall (a :: k). f (t a) -> u a) -> f (g t) -> g u
    fmapTraverse f :: forall (a :: k). f (t a) -> u a
    f x :: f (g t)
    x = (forall (a :: k). Compose f t a -> u a) -> g (Compose f t) -> g u
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    fmap (f (t a) -> u a
    forall (a :: k). f (t a) -> u a
    f (f (t a) -> u a)
    -> (Compose f t a -> f (t a)) -> Compose f t a -> u a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Compose f t a -> f (t a)
    forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2).
    Compose f g a -> f (g a)
    getCompose) (f (g t) -> g (Compose f t)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    f1 (g f2) -> g (Compose f1 f2)
    distributeTraversable f (g t)
    x)

    -- | Like 'liftA2', but traverses over its first argument
    liftA2Traverse1 :: (Apply g, DistributiveTraversable g, Rank1.Traversable f) =>
                       (forall a. f (t a) -> u a -> v a) -> f (g t) -> g u -> g v
    liftA2Traverse1 :: (forall (a :: k). f (t a) -> u a -> v a) -> f (g t) -> g u -> g v
    liftA2Traverse1 f :: forall (a :: k). f (t a) -> u a -> v a
    f x :: f (g t)
    x = (forall (a :: k). Compose f t a -> u a -> v a)
    -> g (Compose f t) -> g u -> g v
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    liftA2 (f (t a) -> u a -> v a
    forall (a :: k). f (t a) -> u a -> v a
    f (f (t a) -> u a -> v a)
    -> (Compose f t a -> f (t a)) -> Compose f t a -> u a -> v a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Compose f t a -> f (t a)
    forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2).
    Compose f g a -> f (g a)
    getCompose) (f (g t) -> g (Compose f t)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    f1 (g f2) -> g (Compose f1 f2)
    distributeTraversable f (g t)
    x)

    -- | Like 'liftA2', but traverses over its second argument
    liftA2Traverse2 :: (Apply g, DistributiveTraversable g, Rank1.Traversable f) =>
                       (forall a. t a -> f (u a) -> v a) -> g t -> f (g u) -> g v
    liftA2Traverse2 :: (forall (a :: k). t a -> f (u a) -> v a) -> g t -> f (g u) -> g v
    liftA2Traverse2 f :: forall (a :: k). t a -> f (u a) -> v a
    f x :: g t
    x y :: f (g u)
    y = (forall (a :: k). t a -> Compose f u a -> v a)
    -> g t -> g (Compose f u) -> g v
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    liftA2 (\x' :: t a
    x' y' :: Compose f u a
    y' -> t a -> f (u a) -> v a
    forall (a :: k). t a -> f (u a) -> v a
    f t a
    x' (Compose f u a -> f (u a)
    forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2).
    Compose f g a -> f (g a)
    getCompose Compose f u a
    y')) g t
    x (f (g u) -> g (Compose f u)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    f1 (g f2) -> g (Compose f1 f2)
    distributeTraversable f (g u)
    y)

    -- | Like 'liftA2', but traverses over both its arguments
    liftA2TraverseBoth :: (Apply g, DistributiveTraversable g, Rank1.Traversable f1, Rank1.Traversable f2) =>
                          (forall a. f1 (t a) -> f2 (u a) -> v a) -> f1 (g t) -> f2 (g u) -> g v
    liftA2TraverseBoth :: (forall (a :: k). f1 (t a) -> f2 (u a) -> v a)
    -> f1 (g t) -> f2 (g u) -> g v
    liftA2TraverseBoth f :: forall (a :: k). f1 (t a) -> f2 (u a) -> v a
    f x :: f1 (g t)
    x y :: f2 (g u)
    y = (forall (a :: k). Compose f1 t a -> Compose f2 u a -> v a)
    -> g (Compose f1 t) -> g (Compose f2 u) -> g v
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    liftA2 forall (a :: k). Compose f1 t a -> Compose f2 u a -> v a
    applyCompose (f1 (g t) -> g (Compose f1 t)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    f1 (g f2) -> g (Compose f1 f2)
    distributeTraversable f1 (g t)
    x) (f2 (g u) -> g (Compose f2 u)
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    f1 (g f2) -> g (Compose f1 f2)
    distributeTraversable f2 (g u)
    y)
       where applyCompose :: Compose f1 t a -> Compose f2 u a -> v a
    applyCompose x' :: Compose f1 t a
    x' y' :: Compose f2 u a
    y' = f1 (t a) -> f2 (u a) -> v a
    forall (a :: k). f1 (t a) -> f2 (u a) -> v a
    f (Compose f1 t a -> f1 (t a)
    forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2).
    Compose f g a -> f (g a)
    getCompose Compose f1 t a
    x') (Compose f2 u a -> f2 (u a)
    forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2).
    Compose f g a -> f (g a)
    getCompose Compose f2 u a
    y')

    {-# DEPRECATED distributeWith "Use cotraverse instead." #-}
    -- | Synonym for 'cotraverse'
    distributeWith :: (Distributive g, Rank1.Functor f) => (forall i. f (a i) -> b i) -> f (g a) -> g b
    distributeWith :: (forall (i :: k). f (a i) -> b i) -> f (g a) -> g b
    distributeWith = (forall (i :: k). f (a i) -> b i) -> f (g a) -> g b
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse

    {-# DEPRECATED distributeWithTraversable "Use cotraverseTraversable instead." #-}
    -- | Synonym for 'cotraverseTraversable'
    distributeWithTraversable :: (DistributiveTraversable g, Rank1.Traversable m) =>
                                 (forall a. m (p a) -> q a) -> m (g p) -> g q
    distributeWithTraversable :: (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    distributeWithTraversable = (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable

    -- | A rank-2 equivalent of '()', a zero-element tuple
    data Empty f = Empty deriving (Empty f -> Empty f -> Bool
    (Empty f -> Empty f -> Bool)
    -> (Empty f -> Empty f -> Bool) -> Eq (Empty f)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall k (f :: k). Empty f -> Empty f -> Bool
    /= :: Empty f -> Empty f -> Bool
    $c/= :: forall k (f :: k). Empty f -> Empty f -> Bool
    == :: Empty f -> Empty f -> Bool
    $c== :: forall k (f :: k). Empty f -> Empty f -> Bool
    Eq, Eq (Empty f)
    Eq (Empty f) =>
    (Empty f -> Empty f -> Ordering)
    -> (Empty f -> Empty f -> Bool)
    -> (Empty f -> Empty f -> Bool)
    -> (Empty f -> Empty f -> Bool)
    -> (Empty f -> Empty f -> Bool)
    -> (Empty f -> Empty f -> Empty f)
    -> (Empty f -> Empty f -> Empty f)
    -> Ord (Empty f)
    Empty f -> Empty f -> Bool
    Empty f -> Empty f -> Ordering
    Empty f -> Empty f -> Empty f
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall k (f :: k). Eq (Empty f)
    forall k (f :: k). Empty f -> Empty f -> Bool
    forall k (f :: k). Empty f -> Empty f -> Ordering
    forall k (f :: k). Empty f -> Empty f -> Empty f
    min :: Empty f -> Empty f -> Empty f
    $cmin :: forall k (f :: k). Empty f -> Empty f -> Empty f
    max :: Empty f -> Empty f -> Empty f
    $cmax :: forall k (f :: k). Empty f -> Empty f -> Empty f
    >= :: Empty f -> Empty f -> Bool
    $c>= :: forall k (f :: k). Empty f -> Empty f -> Bool
    > :: Empty f -> Empty f -> Bool
    $c> :: forall k (f :: k). Empty f -> Empty f -> Bool
    <= :: Empty f -> Empty f -> Bool
    $c<= :: forall k (f :: k). Empty f -> Empty f -> Bool
    < :: Empty f -> Empty f -> Bool
    $c< :: forall k (f :: k). Empty f -> Empty f -> Bool
    compare :: Empty f -> Empty f -> Ordering
    $ccompare :: forall k (f :: k). Empty f -> Empty f -> Ordering
    $cp1Ord :: forall k (f :: k). Eq (Empty f)
    Ord, Int -> Empty f -> ShowS
    [Empty f] -> ShowS
    Empty f -> String
    (Int -> Empty f -> ShowS)
    -> (Empty f -> String) -> ([Empty f] -> ShowS) -> Show (Empty f)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall k (f :: k). Int -> Empty f -> ShowS
    forall k (f :: k). [Empty f] -> ShowS
    forall k (f :: k). Empty f -> String
    showList :: [Empty f] -> ShowS
    $cshowList :: forall k (f :: k). [Empty f] -> ShowS
    show :: Empty f -> String
    $cshow :: forall k (f :: k). Empty f -> String
    showsPrec :: Int -> Empty f -> ShowS
    $cshowsPrec :: forall k (f :: k). Int -> Empty f -> ShowS
    Show)

    -- | A rank-2 tuple of only one element
    newtype Only a f = Only {Only a f -> f a
    fromOnly :: f a} deriving (Only a f -> Only a f -> Bool
    (Only a f -> Only a f -> Bool)
    -> (Only a f -> Only a f -> Bool) -> Eq (Only a f)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall k (a :: k) (f :: k -> *).
    Eq (f a) =>
    Only a f -> Only a f -> Bool
    /= :: Only a f -> Only a f -> Bool
    $c/= :: forall k (a :: k) (f :: k -> *).
    Eq (f a) =>
    Only a f -> Only a f -> Bool
    == :: Only a f -> Only a f -> Bool
    $c== :: forall k (a :: k) (f :: k -> *).
    Eq (f a) =>
    Only a f -> Only a f -> Bool
    Eq, Eq (Only a f)
    Eq (Only a f) =>
    (Only a f -> Only a f -> Ordering)
    -> (Only a f -> Only a f -> Bool)
    -> (Only a f -> Only a f -> Bool)
    -> (Only a f -> Only a f -> Bool)
    -> (Only a f -> Only a f -> Bool)
    -> (Only a f -> Only a f -> Only a f)
    -> (Only a f -> Only a f -> Only a f)
    -> Ord (Only a f)
    Only a f -> Only a f -> Bool
    Only a f -> Only a f -> Ordering
    Only a f -> Only a f -> Only a f
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall k (a :: k) (f :: k -> *). Ord (f a) => Eq (Only a f)
    forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Bool
    forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Ordering
    forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Only a f
    min :: Only a f -> Only a f -> Only a f
    $cmin :: forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Only a f
    max :: Only a f -> Only a f -> Only a f
    $cmax :: forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Only a f
    >= :: Only a f -> Only a f -> Bool
    $c>= :: forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Bool
    > :: Only a f -> Only a f -> Bool
    $c> :: forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Bool
    <= :: Only a f -> Only a f -> Bool
    $c<= :: forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Bool
    < :: Only a f -> Only a f -> Bool
    $c< :: forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Bool
    compare :: Only a f -> Only a f -> Ordering
    $ccompare :: forall k (a :: k) (f :: k -> *).
    Ord (f a) =>
    Only a f -> Only a f -> Ordering
    $cp1Ord :: forall k (a :: k) (f :: k -> *). Ord (f a) => Eq (Only a f)
    Ord, Int -> Only a f -> ShowS
    [Only a f] -> ShowS
    Only a f -> String
    (Int -> Only a f -> ShowS)
    -> (Only a f -> String) -> ([Only a f] -> ShowS) -> Show (Only a f)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall k (a :: k) (f :: k -> *).
    Show (f a) =>
    Int -> Only a f -> ShowS
    forall k (a :: k) (f :: k -> *). Show (f a) => [Only a f] -> ShowS
    forall k (a :: k) (f :: k -> *). Show (f a) => Only a f -> String
    showList :: [Only a f] -> ShowS
    $cshowList :: forall k (a :: k) (f :: k -> *). Show (f a) => [Only a f] -> ShowS
    show :: Only a f -> String
    $cshow :: forall k (a :: k) (f :: k -> *). Show (f a) => Only a f -> String
    showsPrec :: Int -> Only a f -> ShowS
    $cshowsPrec :: forall k (a :: k) (f :: k -> *).
    Show (f a) =>
    Int -> Only a f -> ShowS
    Show)

    -- | Equivalent of 'Data.Functor.Identity' for rank 2 data types
    newtype Identity g f = Identity {Identity g f -> g f
    runIdentity :: g f} deriving (Identity g f -> Identity g f -> Bool
    (Identity g f -> Identity g f -> Bool)
    -> (Identity g f -> Identity g f -> Bool) -> Eq (Identity g f)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall k (g :: k -> *) (f :: k).
    Eq (g f) =>
    Identity g f -> Identity g f -> Bool
    /= :: Identity g f -> Identity g f -> Bool
    $c/= :: forall k (g :: k -> *) (f :: k).
    Eq (g f) =>
    Identity g f -> Identity g f -> Bool
    == :: Identity g f -> Identity g f -> Bool
    $c== :: forall k (g :: k -> *) (f :: k).
    Eq (g f) =>
    Identity g f -> Identity g f -> Bool
    Eq, Eq (Identity g f)
    Eq (Identity g f) =>
    (Identity g f -> Identity g f -> Ordering)
    -> (Identity g f -> Identity g f -> Bool)
    -> (Identity g f -> Identity g f -> Bool)
    -> (Identity g f -> Identity g f -> Bool)
    -> (Identity g f -> Identity g f -> Bool)
    -> (Identity g f -> Identity g f -> Identity g f)
    -> (Identity g f -> Identity g f -> Identity g f)
    -> Ord (Identity g f)
    Identity g f -> Identity g f -> Bool
    Identity g f -> Identity g f -> Ordering
    Identity g f -> Identity g f -> Identity g f
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall k (g :: k -> *) (f :: k). Ord (g f) => Eq (Identity g f)
    forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Bool
    forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Ordering
    forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Identity g f
    min :: Identity g f -> Identity g f -> Identity g f
    $cmin :: forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Identity g f
    max :: Identity g f -> Identity g f -> Identity g f
    $cmax :: forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Identity g f
    >= :: Identity g f -> Identity g f -> Bool
    $c>= :: forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Bool
    > :: Identity g f -> Identity g f -> Bool
    $c> :: forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Bool
    <= :: Identity g f -> Identity g f -> Bool
    $c<= :: forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Bool
    < :: Identity g f -> Identity g f -> Bool
    $c< :: forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Bool
    compare :: Identity g f -> Identity g f -> Ordering
    $ccompare :: forall k (g :: k -> *) (f :: k).
    Ord (g f) =>
    Identity g f -> Identity g f -> Ordering
    $cp1Ord :: forall k (g :: k -> *) (f :: k). Ord (g f) => Eq (Identity g f)
    Ord, Int -> Identity g f -> ShowS
    [Identity g f] -> ShowS
    Identity g f -> String
    (Int -> Identity g f -> ShowS)
    -> (Identity g f -> String)
    -> ([Identity g f] -> ShowS)
    -> Show (Identity g f)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall k (g :: k -> *) (f :: k).
    Show (g f) =>
    Int -> Identity g f -> ShowS
    forall k (g :: k -> *) (f :: k).
    Show (g f) =>
    [Identity g f] -> ShowS
    forall k (g :: k -> *) (f :: k).
    Show (g f) =>
    Identity g f -> String
    showList :: [Identity g f] -> ShowS
    $cshowList :: forall k (g :: k -> *) (f :: k).
    Show (g f) =>
    [Identity g f] -> ShowS
    show :: Identity g f -> String
    $cshow :: forall k (g :: k -> *) (f :: k).
    Show (g f) =>
    Identity g f -> String
    showsPrec :: Int -> Identity g f -> ShowS
    $cshowsPrec :: forall k (g :: k -> *) (f :: k).
    Show (g f) =>
    Int -> Identity g f -> ShowS
    Show)

    -- | A nested parametric type represented as a rank-2 type
    newtype Flip g a f = Flip {Flip g a f -> g (f a)
    unFlip :: g (f a)} deriving (Flip g a f -> Flip g a f -> Bool
    (Flip g a f -> Flip g a f -> Bool)
    -> (Flip g a f -> Flip g a f -> Bool) -> Eq (Flip g a f)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Eq (g (f a)) =>
    Flip g a f -> Flip g a f -> Bool
    /= :: Flip g a f -> Flip g a f -> Bool
    $c/= :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Eq (g (f a)) =>
    Flip g a f -> Flip g a f -> Bool
    == :: Flip g a f -> Flip g a f -> Bool
    $c== :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Eq (g (f a)) =>
    Flip g a f -> Flip g a f -> Bool
    Eq, Eq (Flip g a f)
    Eq (Flip g a f) =>
    (Flip g a f -> Flip g a f -> Ordering)
    -> (Flip g a f -> Flip g a f -> Bool)
    -> (Flip g a f -> Flip g a f -> Bool)
    -> (Flip g a f -> Flip g a f -> Bool)
    -> (Flip g a f -> Flip g a f -> Bool)
    -> (Flip g a f -> Flip g a f -> Flip g a f)
    -> (Flip g a f -> Flip g a f -> Flip g a f)
    -> Ord (Flip g a f)
    Flip g a f -> Flip g a f -> Bool
    Flip g a f -> Flip g a f -> Ordering
    Flip g a f -> Flip g a f -> Flip g a f
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Eq (Flip g a f)
    forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Bool
    forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Ordering
    forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Flip g a f
    min :: Flip g a f -> Flip g a f -> Flip g a f
    $cmin :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Flip g a f
    max :: Flip g a f -> Flip g a f -> Flip g a f
    $cmax :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Flip g a f
    >= :: Flip g a f -> Flip g a f -> Bool
    $c>= :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Bool
    > :: Flip g a f -> Flip g a f -> Bool
    $c> :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Bool
    <= :: Flip g a f -> Flip g a f -> Bool
    $c<= :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Bool
    < :: Flip g a f -> Flip g a f -> Bool
    $c< :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Bool
    compare :: Flip g a f -> Flip g a f -> Ordering
    $ccompare :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Flip g a f -> Flip g a f -> Ordering
    $cp1Ord :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Ord (g (f a)) =>
    Eq (Flip g a f)
    Ord, Int -> Flip g a f -> ShowS
    [Flip g a f] -> ShowS
    Flip g a f -> String
    (Int -> Flip g a f -> ShowS)
    -> (Flip g a f -> String)
    -> ([Flip g a f] -> ShowS)
    -> Show (Flip g a f)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Show (g (f a)) =>
    Int -> Flip g a f -> ShowS
    forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Show (g (f a)) =>
    [Flip g a f] -> ShowS
    forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Show (g (f a)) =>
    Flip g a f -> String
    showList :: [Flip g a f] -> ShowS
    $cshowList :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Show (g (f a)) =>
    [Flip g a f] -> ShowS
    show :: Flip g a f -> String
    $cshow :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Show (g (f a)) =>
    Flip g a f -> String
    showsPrec :: Int -> Flip g a f -> ShowS
    $cshowsPrec :: forall k (g :: k -> *) k (a :: k) (f :: k -> k).
    Show (g (f a)) =>
    Int -> Flip g a f -> ShowS
    Show)

    instance Semigroup (g (f a)) => Semigroup (Flip g a f) where
       Flip x :: g (f a)
    x <> :: Flip g a f -> Flip g a f -> Flip g a f
    <> Flip y :: g (f a)
    y = g (f a) -> Flip g a f
    forall k k (g :: k -> *) (a :: k) (f :: k -> k).
    g (f a) -> Flip g a f
    Flip (g (f a)
    x g (f a) -> g (f a) -> g (f a)
    forall a. Semigroup a => a -> a -> a
    <> g (f a)
    y)

    instance Monoid (g (f a)) => Monoid (Flip g a f) where
       mempty :: Flip g a f
    mempty = g (f a) -> Flip g a f
    forall k k (g :: k -> *) (a :: k) (f :: k -> k).
    g (f a) -> Flip g a f
    Flip g (f a)
    forall a. Monoid a => a
    mempty
       Flip x :: g (f a)
    x mappend :: Flip g a f -> Flip g a f -> Flip g a f
    `mappend` Flip y :: g (f a)
    y = g (f a) -> Flip g a f
    forall k k (g :: k -> *) (a :: k) (f :: k -> k).
    g (f a) -> Flip g a f
    Flip (g (f a)
    x g (f a) -> g (f a) -> g (f a)
    forall a. Monoid a => a -> a -> a
    `mappend` g (f a)
    y)

    instance Rank1.Functor g => Rank2.Functor (Flip g a) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> Flip g a p -> Flip g a q
    <$> Flip g :: g (p a)
    g = g (q a) -> Flip g a q
    forall k k (g :: k -> *) (a :: k) (f :: k -> k).
    g (f a) -> Flip g a f
    Flip (p a -> q a
    forall (a :: k). p a -> q a
    f (p a -> q a) -> g (p a) -> g (q a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.<$> g (p a)
    g)

    instance Rank1.Applicative g => Rank2.Apply (Flip g a) where
       Flip g :: g ((~>) p q a)
    g <*> :: Flip g a (p ~> q) -> Flip g a p -> Flip g a q
    <*> Flip h :: g (p a)
    h = g (q a) -> Flip g a q
    forall k k (g :: k -> *) (a :: k) (f :: k -> k).
    g (f a) -> Flip g a f
    Flip ((~>) p q a -> p a -> q a
    forall k (p :: k -> *) (q :: k -> *) (a :: k).
    Arrow p q a -> p a -> q a
    apply ((~>) p q a -> p a -> q a) -> g ((~>) p q a) -> g (p a -> q a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.<$> g ((~>) p q a)
    g g (p a -> q a) -> g (p a) -> g (q a)
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    Rank1.<*> g (p a)
    h)

    instance Rank1.Applicative g => Rank2.Applicative (Flip g a) where
       pure :: (forall (a :: k). f a) -> Flip g a f
    pure f :: forall (a :: k). f a
    f = g (f a) -> Flip g a f
    forall k k (g :: k -> *) (a :: k) (f :: k -> k).
    g (f a) -> Flip g a f
    Flip (f a -> g (f a)
    forall (f :: * -> *) a. Applicative f => a -> f a
    Rank1.pure f a
    forall (a :: k). f a
    f)

    instance Rank1.Foldable g => Rank2.Foldable (Flip g a) where
       foldMap :: (forall (a :: k). p a -> m) -> Flip g a p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (Flip g :: g (p a)
    g) = (p a -> m) -> g (p a) -> m
    forall (t :: * -> *) m a.
    (Foldable t, Monoid m) =>
    (a -> m) -> t a -> m
    Rank1.foldMap p a -> m
    forall (a :: k). p a -> m
    f g (p a)
    g

    instance Rank1.Traversable g => Rank2.Traversable (Flip g a) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> Flip g a p -> m (Flip g a q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (Flip g :: g (p a)
    g) = g (q a) -> Flip g a q
    forall k k (g :: k -> *) (a :: k) (f :: k -> k).
    g (f a) -> Flip g a f
    Flip (g (q a) -> Flip g a q) -> m (g (q a)) -> m (Flip g a q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.<$> (p a -> m (q a)) -> g (p a) -> m (g (q a))
    forall (t :: * -> *) (f :: * -> *) a b.
    (Traversable t, Applicative f) =>
    (a -> f b) -> t a -> f (t b)
    Rank1.traverse p a -> m (q a)
    forall (a :: k). p a -> m (q a)
    f g (p a)
    g

    instance Functor Empty where
       _ <$> :: (forall (a :: k). p a -> q a) -> Empty p -> Empty q
    <$> _ = Empty q
    forall k (f :: k). Empty f
    Empty

    instance Functor Proxy where
       _ <$> :: (forall (a :: k). p a -> q a) -> Proxy p -> Proxy q
    <$> _ = Proxy q
    forall k (t :: k). Proxy t
    Proxy

    instance Functor (Const a) where
       _ <$> :: (forall (a :: k). p a -> q a) -> Const a p -> Const a q
    <$> Const a :: a
    a = a -> Const a q
    forall k a (b :: k). a -> Const a b
    Const a
    a

    instance Functor (Only a) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> Only a p -> Only a q
    <$> Only a :: p a
    a = q a -> Only a q
    forall k (a :: k) (f :: k -> *). f a -> Only a f
    Only (p a -> q a
    forall (a :: k). p a -> q a
    f p a
    a)

    instance Functor g => Functor (Identity g) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> Identity g p -> Identity g q
    <$> Identity g :: g p
    g = g q -> Identity g q
    forall k (g :: k -> *) (f :: k). g f -> Identity g f
    Identity (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> g p
    g)

    instance (Functor g, Functor h) => Functor (Product g h) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> Product g h p -> Product g h q
    <$> Pair a :: g p
    a b :: h p
    b = g q -> h q -> Product g h q
    forall k (f :: k -> *) (g :: k -> *) (a :: k).
    f a -> g a -> Product f g a
    Pair (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> g p
    a) (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> h p -> h q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> h p
    b)

    instance (Functor g, Functor h) => Functor (Sum g h) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> Sum g h p -> Sum g h q
    <$> InL g :: g p
    g = g q -> Sum g h q
    forall k (f :: k -> *) (g :: k -> *) (a :: k). f a -> Sum f g a
    InL (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> g p
    g)
       f :: forall (a :: k). p a -> q a
    f <$> InR h :: h p
    h = h q -> Sum g h q
    forall k (f :: k -> *) (g :: k -> *) (a :: k). g a -> Sum f g a
    InR (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> h p -> h q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> h p
    h)

    instance Functor Generics.V1 where
       <$> :: (forall (a :: k). p a -> q a) -> V1 p -> V1 q
    (<$>) _ = V1 p -> V1 q
    forall a b. Coercible a b => a -> b
    coerce

    instance Functor Generics.U1 where
       <$> :: (forall (a :: k). p a -> q a) -> U1 p -> U1 q
    (<$>) _ = U1 p -> U1 q
    forall a b. Coercible a b => a -> b
    coerce

    instance Functor (Generics.K1 i c) where
       <$> :: (forall (a :: k). p a -> q a) -> K1 i c p -> K1 i c q
    (<$>) _ = K1 i c p -> K1 i c q
    forall a b. Coercible a b => a -> b
    coerce

    instance Functor f => Functor (Generics.M1 i c f) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> M1 i c f p -> M1 i c f q
    <$> Generics.M1 x :: f p
    x = f q -> M1 i c f q
    forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
    Generics.M1 (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> f p -> f q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> f p
    x)

    instance Functor f => Functor (Generics.Rec1 f) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> Rec1 f p -> Rec1 f q
    <$> Generics.Rec1 x :: f p
    x = f q -> Rec1 f q
    forall k (f :: k -> *) (p :: k). f p -> Rec1 f p
    Generics.Rec1 (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> f p -> f q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> f p
    x)

    -- instance (Rank1.Functor f, Functor g) => Functor ((Generics.:.:) f g) where
    --    f <$> Generics.Comp1 x = Generics.Comp1 (Rank1.fmap (f <$>) x)

    instance (Functor f, Functor g) => Functor ((Generics.:+:) f g) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> (:+:) f g p -> (:+:) f g q
    <$> Generics.L1 x :: f p
    x = f q -> (:+:) f g q
    forall k (f :: k -> *) (g :: k -> *) (p :: k). f p -> (:+:) f g p
    Generics.L1 (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> f p -> f q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> f p
    x)
       f :: forall (a :: k). p a -> q a
    f <$> Generics.R1 x :: g p
    x = g q -> (:+:) f g q
    forall k (f :: k -> *) (g :: k -> *) (p :: k). g p -> (:+:) f g p
    Generics.R1 (forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> g p
    x)

    instance (Functor f, Functor g) => Functor ((Generics.:*:) f g) where
       f :: forall (a :: k). p a -> q a
    f <$> :: (forall (a :: k). p a -> q a) -> (:*:) f g p -> (:*:) f g q
    <$> (x :: f p
    x Generics.:*: y :: g p
    y) = forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> f p -> f q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> f p
    x f q -> g q -> (:*:) f g q
    forall k (f :: k -> *) (g :: k -> *) (p :: k).
    f p -> g p -> (:*:) f g p
    Generics.:*: forall (a :: k). p a -> q a
    f (forall (a :: k). p a -> q a) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Functor g =>
    (forall (a :: k). p a -> q a) -> g p -> g q
    <$> g p
    y

    instance Foldable Empty where
       foldMap :: (forall (a :: k). p a -> m) -> Empty p -> m
    foldMap _ _ = m
    forall a. Monoid a => a
    mempty

    instance Foldable Proxy where
       foldMap :: (forall (a :: k). p a -> m) -> Proxy p -> m
    foldMap _ _ = m
    forall a. Monoid a => a
    mempty

    instance Foldable (Const x) where
       foldMap :: (forall (a :: k). p a -> m) -> Const x p -> m
    foldMap _ _ = m
    forall a. Monoid a => a
    mempty

    instance Foldable (Only x) where
       foldMap :: (forall (a :: k). p a -> m) -> Only x p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (Only x :: p x
    x) = p x -> m
    forall (a :: k). p a -> m
    f p x
    x

    instance Foldable g => Foldable (Identity g) where
       foldMap :: (forall (a :: k). p a -> m) -> Identity g p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (Identity g :: g p
    g) = (forall (a :: k). p a -> m) -> g p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f g p
    g

    instance (Foldable g, Foldable h) => Foldable (Product g h) where
       foldMap :: (forall (a :: k). p a -> m) -> Product g h p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (Pair g :: g p
    g h :: h p
    h) = (forall (a :: k). p a -> m) -> g p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f g p
    g m -> m -> m
    forall a. Monoid a => a -> a -> a
    `mappend` (forall (a :: k). p a -> m) -> h p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f h p
    h

    instance (Foldable g, Foldable h) => Foldable (Sum g h) where
       foldMap :: (forall (a :: k). p a -> m) -> Sum g h p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (InL g :: g p
    g) = (forall (a :: k). p a -> m) -> g p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f g p
    g
       foldMap f :: forall (a :: k). p a -> m
    f (InR h :: h p
    h) = (forall (a :: k). p a -> m) -> h p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f h p
    h

    instance Foldable Generics.V1 where
       foldMap :: (forall (a :: k). p a -> m) -> V1 p -> m
    foldMap _ v :: V1 p
    v = case V1 p
    v of {}

    instance Foldable Generics.U1 where
       foldMap :: (forall (a :: k). p a -> m) -> U1 p -> m
    foldMap _ _ = m
    forall a. Monoid a => a
    mempty

    instance Foldable (Generics.K1 i c) where
       foldMap :: (forall (a :: k). p a -> m) -> K1 i c p -> m
    foldMap _ _ = m
    forall a. Monoid a => a
    mempty

    instance Foldable f => Foldable (Generics.M1 i c f) where
       foldMap :: (forall (a :: k). p a -> m) -> M1 i c f p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (Generics.M1 x :: f p
    x) = (forall (a :: k). p a -> m) -> f p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f f p
    x

    instance Foldable f => Foldable (Generics.Rec1 f) where
       foldMap :: (forall (a :: k). p a -> m) -> Rec1 f p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (Generics.Rec1 x :: f p
    x) = (forall (a :: k). p a -> m) -> f p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f f p
    x

    instance (Foldable f, Foldable g) => Foldable ((Generics.:+:) f g) where
       foldMap :: (forall (a :: k). p a -> m) -> (:+:) f g p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (Generics.L1 x :: f p
    x) = (forall (a :: k). p a -> m) -> f p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f f p
    x
       foldMap f :: forall (a :: k). p a -> m
    f (Generics.R1 x :: g p
    x) = (forall (a :: k). p a -> m) -> g p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f g p
    x

    instance (Foldable f, Foldable g) => Foldable ((Generics.:*:) f g) where
       foldMap :: (forall (a :: k). p a -> m) -> (:*:) f g p -> m
    foldMap f :: forall (a :: k). p a -> m
    f (x :: f p
    x Generics.:*: y :: g p
    y) = (forall (a :: k). p a -> m) -> f p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f f p
    x m -> m -> m
    forall a. Semigroup a => a -> a -> a
    <> (forall (a :: k). p a -> m) -> g p -> m
    forall k (g :: (k -> *) -> *) m (p :: k -> *).
    (Foldable g, Monoid m) =>
    (forall (a :: k). p a -> m) -> g p -> m
    foldMap forall (a :: k). p a -> m
    f g p
    y

    instance Traversable Empty where
       traverse :: (forall (a :: k). p a -> m (q a)) -> Empty p -> m (Empty q)
    traverse _ _ = Empty q -> m (Empty q)
    forall (f :: * -> *) a. Applicative f => a -> f a
    Rank1.pure Empty q
    forall k (f :: k). Empty f
    Empty

    instance Traversable Proxy where
       traverse :: (forall (a :: k). p a -> m (q a)) -> Proxy p -> m (Proxy q)
    traverse _ _ = Proxy q -> m (Proxy q)
    forall (f :: * -> *) a. Applicative f => a -> f a
    Rank1.pure Proxy q
    forall k (t :: k). Proxy t
    Proxy

    instance Traversable (Const x) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> Const x p -> m (Const x q)
    traverse _ (Const x :: x
    x) = Const x q -> m (Const x q)
    forall (f :: * -> *) a. Applicative f => a -> f a
    Rank1.pure (x -> Const x q
    forall k a (b :: k). a -> Const a b
    Const x
    x)

    instance Traversable (Only x) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> Only x p -> m (Only x q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (Only x :: p x
    x) = q x -> Only x q
    forall k (a :: k) (f :: k -> *). f a -> Only a f
    Only (q x -> Only x q) -> m (q x) -> m (Only x q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.<$> p x -> m (q x)
    forall (a :: k). p a -> m (q a)
    f p x
    x

    instance Traversable g => Traversable (Identity g) where
       traverse :: (forall (a :: k). p a -> m (q a))
    -> Identity g p -> m (Identity g q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (Identity g :: g p
    g) = g q -> Identity g q
    forall k (g :: k -> *) (f :: k). g f -> Identity g f
    Identity (g q -> Identity g q) -> m (g q) -> m (Identity g q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.<$> (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f g p
    g

    instance (Traversable g, Traversable h) => Traversable (Product g h) where
       traverse :: (forall (a :: k). p a -> m (q a))
    -> Product g h p -> m (Product g h q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (Pair g :: g p
    g h :: h p
    h) = (g q -> h q -> Product g h q)
    -> m (g q) -> m (h q) -> m (Product g h q)
    forall (f :: * -> *) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    Rank1.liftA2 g q -> h q -> Product g h q
    forall k (f :: k -> *) (g :: k -> *) (a :: k).
    f a -> g a -> Product f g a
    Pair ((forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f g p
    g) ((forall (a :: k). p a -> m (q a)) -> h p -> m (h q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f h p
    h)

    instance (Traversable g, Traversable h) => Traversable (Sum g h) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> Sum g h p -> m (Sum g h q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (InL g :: g p
    g) = g q -> Sum g h q
    forall k (f :: k -> *) (g :: k -> *) (a :: k). f a -> Sum f g a
    InL (g q -> Sum g h q) -> m (g q) -> m (Sum g h q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.<$> (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f g p
    g
       traverse f :: forall (a :: k). p a -> m (q a)
    f (InR h :: h p
    h) = h q -> Sum g h q
    forall k (f :: k -> *) (g :: k -> *) (a :: k). g a -> Sum f g a
    InR (h q -> Sum g h q) -> m (h q) -> m (Sum g h q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.<$> (forall (a :: k). p a -> m (q a)) -> h p -> m (h q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f h p
    h

    instance Traversable Generics.V1 where
       traverse :: (forall (a :: k). p a -> m (q a)) -> V1 p -> m (V1 q)
    traverse _ = V1 q -> m (V1 q)
    forall (f :: * -> *) a. Applicative f => a -> f a
    Rank1.pure (V1 q -> m (V1 q)) -> (V1 p -> V1 q) -> V1 p -> m (V1 q)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . V1 p -> V1 q
    forall a b. Coercible a b => a -> b
    coerce

    instance Traversable Generics.U1 where
       traverse :: (forall (a :: k). p a -> m (q a)) -> U1 p -> m (U1 q)
    traverse _ = U1 q -> m (U1 q)
    forall (f :: * -> *) a. Applicative f => a -> f a
    Rank1.pure (U1 q -> m (U1 q)) -> (U1 p -> U1 q) -> U1 p -> m (U1 q)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . U1 p -> U1 q
    forall a b. Coercible a b => a -> b
    coerce

    instance Traversable (Generics.K1 i c) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> K1 i c p -> m (K1 i c q)
    traverse _ = K1 i c q -> m (K1 i c q)
    forall (f :: * -> *) a. Applicative f => a -> f a
    Rank1.pure (K1 i c q -> m (K1 i c q))
    -> (K1 i c p -> K1 i c q) -> K1 i c p -> m (K1 i c q)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . K1 i c p -> K1 i c q
    forall a b. Coercible a b => a -> b
    coerce

    instance Traversable f => Traversable (Generics.M1 i c f) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> M1 i c f p -> m (M1 i c f q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (Generics.M1 x :: f p
    x) = (f q -> M1 i c f q) -> m (f q) -> m (M1 i c f q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap f q -> M1 i c f q
    forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
    Generics.M1 ((forall (a :: k). p a -> m (q a)) -> f p -> m (f q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f f p
    x)

    instance Traversable f => Traversable (Generics.Rec1 f) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> Rec1 f p -> m (Rec1 f q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (Generics.Rec1 x :: f p
    x) = (f q -> Rec1 f q) -> m (f q) -> m (Rec1 f q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap f q -> Rec1 f q
    forall k (f :: k -> *) (p :: k). f p -> Rec1 f p
    Generics.Rec1 ((forall (a :: k). p a -> m (q a)) -> f p -> m (f q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f f p
    x)

    instance (Traversable f, Traversable g) => Traversable ((Generics.:+:) f g) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> (:+:) f g p -> m ((:+:) f g q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (Generics.L1 x :: f p
    x) = (f q -> (:+:) f g q) -> m (f q) -> m ((:+:) f g q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap f q -> (:+:) f g q
    forall k (f :: k -> *) (g :: k -> *) (p :: k). f p -> (:+:) f g p
    Generics.L1 ((forall (a :: k). p a -> m (q a)) -> f p -> m (f q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f f p
    x)
       traverse f :: forall (a :: k). p a -> m (q a)
    f (Generics.R1 x :: g p
    x) = (g q -> (:+:) f g q) -> m (g q) -> m ((:+:) f g q)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap g q -> (:+:) f g q
    forall k (f :: k -> *) (g :: k -> *) (p :: k). g p -> (:+:) f g p
    Generics.R1 ((forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f g p
    x)

    instance (Traversable f, Traversable g) => Traversable ((Generics.:*:) f g) where
       traverse :: (forall (a :: k). p a -> m (q a)) -> (:*:) f g p -> m ((:*:) f g q)
    traverse f :: forall (a :: k). p a -> m (q a)
    f (x :: f p
    x Generics.:*: y :: g p
    y) = (f q -> g q -> (:*:) f g q)
    -> m (f q) -> m (g q) -> m ((:*:) f g q)
    forall (f :: * -> *) a b c.
    Applicative f =>
    (a -> b -> c) -> f a -> f b -> f c
    Rank1.liftA2 f q -> g q -> (:*:) f g q
    forall k (f :: k -> *) (g :: k -> *) (p :: k).
    f p -> g p -> (:*:) f g p
    (Generics.:*:) ((forall (a :: k). p a -> m (q a)) -> f p -> m (f q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f f p
    x) ((forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Traversable g, Applicative m) =>
    (forall (a :: k). p a -> m (q a)) -> g p -> m (g q)
    traverse forall (a :: k). p a -> m (q a)
    f g p
    y)

    instance Apply Empty where
       _ <*> :: Empty (p ~> q) -> Empty p -> Empty q
    <*> _ = Empty q
    forall k (f :: k). Empty f
    Empty
       liftA2 :: (forall (a :: k). p a -> q a -> r a)
    -> Empty p -> Empty q -> Empty r
    liftA2 _ _ _ = Empty r
    forall k (f :: k). Empty f
    Empty

    instance Apply Proxy where
       _ <*> :: Proxy (p ~> q) -> Proxy p -> Proxy q
    <*> _ = Proxy q
    forall k (t :: k). Proxy t
    Proxy
       liftA2 :: (forall (a :: k). p a -> q a -> r a)
    -> Proxy p -> Proxy q -> Proxy r
    liftA2 _ _ _ = Proxy r
    forall k (t :: k). Proxy t
    Proxy

    instance Semigroup x => Apply (Const x) where
       Const x :: x
    x <*> :: Const x (p ~> q) -> Const x p -> Const x q
    <*> Const y :: x
    y = x -> Const x q
    forall k a (b :: k). a -> Const a b
    Const (x
    x x -> x -> x
    forall a. Semigroup a => a -> a -> a
    <> x
    y)
       liftA2 :: (forall (a :: k). p a -> q a -> r a)
    -> Const x p -> Const x q -> Const x r
    liftA2 _ (Const x :: x
    x) (Const y :: x
    y) = x -> Const x r
    forall k a (b :: k). a -> Const a b
    Const (x
    x x -> x -> x
    forall a. Semigroup a => a -> a -> a
    <> x
    y)

    instance Apply (Only x) where
       Only f :: (~>) p q x
    f <*> :: Only x (p ~> q) -> Only x p -> Only x q
    <*> Only x :: p x
    x = q x -> Only x q
    forall k (a :: k) (f :: k -> *). f a -> Only a f
    Only ((~>) p q x -> p x -> q x
    forall k (p :: k -> *) (q :: k -> *) (a :: k).
    Arrow p q a -> p a -> q a
    apply (~>) p q x
    f p x
    x)
       liftA2 :: (forall (a :: k). p a -> q a -> r a)
    -> Only x p -> Only x q -> Only x r
    liftA2 f :: forall (a :: k). p a -> q a -> r a
    f (Only x :: p x
    x) (Only y :: q x
    y) = r x -> Only x r
    forall k (a :: k) (f :: k -> *). f a -> Only a f
    Only (p x -> q x -> r x
    forall (a :: k). p a -> q a -> r a
    f p x
    x q x
    y)

    instance Apply g => Apply (Identity g) where
       Identity g :: g (p ~> q)
    g <*> :: Identity g (p ~> q) -> Identity g p -> Identity g q
    <*> Identity h :: g p
    h = g q -> Identity g q
    forall k (g :: k -> *) (f :: k). g f -> Identity g f
    Identity (g (p ~> q)
    g g (p ~> q) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> g p
    h)
       liftA2 :: (forall (a :: k). p a -> q a -> r a)
    -> Identity g p -> Identity g q -> Identity g r
    liftA2 f :: forall (a :: k). p a -> q a -> r a
    f (Identity g :: g p
    g) (Identity h :: g q
    h) = g r -> Identity g r
    forall k (g :: k -> *) (f :: k). g f -> Identity g f
    Identity ((forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    liftA2 forall (a :: k). p a -> q a -> r a
    f g p
    g g q
    h)

    instance (Apply g, Apply h) => Apply (Product g h) where
       Pair gf :: g (p ~> q)
    gf hf :: h (p ~> q)
    hf <*> :: Product g h (p ~> q) -> Product g h p -> Product g h q
    <*> ~(Pair gx :: g p
    gx hx :: h p
    hx) = g q -> h q -> Product g h q
    forall k (f :: k -> *) (g :: k -> *) (a :: k).
    f a -> g a -> Product f g a
    Pair (g (p ~> q)
    gf g (p ~> q) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> g p
    gx) (h (p ~> q)
    hf h (p ~> q) -> h p -> h q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> h p
    hx)
       liftA2 :: (forall (a :: k). p a -> q a -> r a)
    -> Product g h p -> Product g h q -> Product g h r
    liftA2 f :: forall (a :: k). p a -> q a -> r a
    f (Pair g1 :: g p
    g1 h1 :: h p
    h1) ~(Pair g2 :: g q
    g2 h2 :: h q
    h2) = g r -> h r -> Product g h r
    forall k (f :: k -> *) (g :: k -> *) (a :: k).
    f a -> g a -> Product f g a
    Pair ((forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    liftA2 forall (a :: k). p a -> q a -> r a
    f g p
    g1 g q
    g2) ((forall (a :: k). p a -> q a -> r a) -> h p -> h q -> h r
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a) -> g p -> g q -> g r
    liftA2 forall (a :: k). p a -> q a -> r a
    f h p
    h1 h q
    h2)
       liftA3 :: (forall (a :: k). p a -> q a -> r a -> s a)
    -> Product g h p -> Product g h q -> Product g h r -> Product g h s
    liftA3 f :: forall (a :: k). p a -> q a -> r a -> s a
    f (Pair g1 :: g p
    g1 h1 :: h p
    h1) ~(Pair g2 :: g q
    g2 h2 :: h q
    h2) ~(Pair g3 :: g r
    g3 h3 :: h r
    h3) = g s -> h s -> Product g h s
    forall k (f :: k -> *) (g :: k -> *) (a :: k).
    f a -> g a -> Product f g a
    Pair ((forall (a :: k). p a -> q a -> r a -> s a)
    -> g p -> g q -> g r -> g s
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *) (s :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a -> s a)
    -> g p -> g q -> g r -> g s
    liftA3 forall (a :: k). p a -> q a -> r a -> s a
    f g p
    g1 g q
    g2 g r
    g3) ((forall (a :: k). p a -> q a -> r a -> s a)
    -> h p -> h q -> h r -> h s
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *)
           (r :: k -> *) (s :: k -> *).
    Apply g =>
    (forall (a :: k). p a -> q a -> r a -> s a)
    -> g p -> g q -> g r -> g s
    liftA3 forall (a :: k). p a -> q a -> r a -> s a
    f h p
    h1 h q
    h2 h r
    h3)

    instance Apply Generics.V1 where
       <*> :: V1 (p ~> q) -> V1 p -> V1 q
    (<*>) _ = V1 p -> V1 q
    forall a b. Coercible a b => a -> b
    coerce

    instance Apply Generics.U1 where
       <*> :: U1 (p ~> q) -> U1 p -> U1 q
    (<*>) _ = U1 p -> U1 q
    forall a b. Coercible a b => a -> b
    coerce

    instance Semigroup c => Apply (Generics.K1 i c) where
       Generics.K1 x :: c
    x <*> :: K1 i c (p ~> q) -> K1 i c p -> K1 i c q
    <*> Generics.K1 y :: c
    y = c -> K1 i c q
    forall k i c (p :: k). c -> K1 i c p
    Generics.K1 (c
    x c -> c -> c
    forall a. Semigroup a => a -> a -> a
    <> c
    y)

    instance Apply f => Apply (Generics.M1 i c f) where
       Generics.M1 f :: f (p ~> q)
    f <*> :: M1 i c f (p ~> q) -> M1 i c f p -> M1 i c f q
    <*> Generics.M1 x :: f p
    x = f q -> M1 i c f q
    forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
    Generics.M1 (f (p ~> q)
    f f (p ~> q) -> f p -> f q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> f p
    x)

    instance Apply f => Apply (Generics.Rec1 f) where
       Generics.Rec1 f :: f (p ~> q)
    f <*> :: Rec1 f (p ~> q) -> Rec1 f p -> Rec1 f q
    <*> Generics.Rec1 x :: f p
    x = f q -> Rec1 f q
    forall k (f :: k -> *) (p :: k). f p -> Rec1 f p
    Generics.Rec1 (f (p ~> q)
    f f (p ~> q) -> f p -> f q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> f p
    x)

    instance (Apply f, Apply g) => Apply ((Generics.:*:) f g) where
       (x1 :: f (p ~> q)
    x1 Generics.:*: y1 :: g (p ~> q)
    y1) <*> :: (:*:) f g (p ~> q) -> (:*:) f g p -> (:*:) f g q
    <*> (x2 :: f p
    x2 Generics.:*: y2 :: g p
    y2) = (f (p ~> q)
    x1 f (p ~> q) -> f p -> f q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> f p
    x2) f q -> g q -> (:*:) f g q
    forall k (f :: k -> *) (g :: k -> *) (p :: k).
    f p -> g p -> (:*:) f g p
    Generics.:*: (g (p ~> q)
    y1 g (p ~> q) -> g p -> g q
    forall k (g :: (k -> *) -> *) (p :: k -> *) (q :: k -> *).
    Apply g =>
    g (p ~> q) -> g p -> g q
    <*> g p
    y2)

    instance Applicative Empty where
       pure :: (forall (a :: k). f a) -> Empty f
    pure = Empty f -> f Any -> Empty f
    forall a b. a -> b -> a
    const Empty f
    forall k (f :: k). Empty f
    Empty

    instance Applicative Proxy where
       pure :: (forall (a :: k). f a) -> Proxy f
    pure = Proxy f -> f Any -> Proxy f
    forall a b. a -> b -> a
    const Proxy f
    forall k (t :: k). Proxy t
    Proxy

    instance (Semigroup x, Monoid x) => Applicative (Const x) where
       pure :: (forall (a :: k). f a) -> Const x f
    pure = Const x f -> f Any -> Const x f
    forall a b. a -> b -> a
    const (x -> Const x f
    forall k a (b :: k). a -> Const a b
    Const x
    forall a. Monoid a => a
    mempty)

    instance Applicative (Only x) where
       pure :: (forall (a :: k). f a) -> Only x f
    pure = (forall (a :: k). f a) -> Only x f
    forall k (a :: k) (f :: k -> *). f a -> Only a f
    Only

    instance Applicative g => Applicative (Identity g) where
       pure :: (forall (a :: k). f a) -> Identity g f
    pure f :: forall (a :: k). f a
    f = g f -> Identity g f
    forall k (g :: k -> *) (f :: k). g f -> Identity g f
    Identity ((forall (a :: k). f a) -> g f
    forall k (g :: (k -> *) -> *) (f :: k -> *).
    Applicative g =>
    (forall (a :: k). f a) -> g f
    pure forall (a :: k). f a
    f)

    instance (Applicative g, Applicative h) => Applicative (Product g h) where
       pure :: (forall (a :: k). f a) -> Product g h f
    pure f :: forall (a :: k). f a
    f = g f -> h f -> Product g h f
    forall k (f :: k -> *) (g :: k -> *) (a :: k).
    f a -> g a -> Product f g a
    Pair ((forall (a :: k). f a) -> g f
    forall k (g :: (k -> *) -> *) (f :: k -> *).
    Applicative g =>
    (forall (a :: k). f a) -> g f
    pure forall (a :: k). f a
    f) ((forall (a :: k). f a) -> h f
    forall k (g :: (k -> *) -> *) (f :: k -> *).
    Applicative g =>
    (forall (a :: k). f a) -> g f
    pure forall (a :: k). f a
    f)

    instance (Semigroup c, Monoid c) => Applicative (Generics.K1 i c) where
       pure :: (forall (a :: k). f a) -> K1 i c f
    pure _ = c -> K1 i c f
    forall k i c (p :: k). c -> K1 i c p
    Generics.K1 c
    forall a. Monoid a => a
    mempty

    instance Applicative f => Applicative (Generics.M1 i c f) where
       pure :: (forall (a :: k). f a) -> M1 i c f f
    pure f :: forall (a :: k). f a
    f = f f -> M1 i c f f
    forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
    Generics.M1 ((forall (a :: k). f a) -> f f
    forall k (g :: (k -> *) -> *) (f :: k -> *).
    Applicative g =>
    (forall (a :: k). f a) -> g f
    pure forall (a :: k). f a
    f)

    instance Applicative f => Applicative (Generics.Rec1 f) where
       pure :: (forall (a :: k). f a) -> Rec1 f f
    pure f :: forall (a :: k). f a
    f = f f -> Rec1 f f
    forall k (f :: k -> *) (p :: k). f p -> Rec1 f p
    Generics.Rec1 ((forall (a :: k). f a) -> f f
    forall k (g :: (k -> *) -> *) (f :: k -> *).
    Applicative g =>
    (forall (a :: k). f a) -> g f
    pure forall (a :: k). f a
    f)

    instance (Applicative f, Applicative g) => Applicative ((Generics.:*:) f g) where
       pure :: (forall (a :: k). f a) -> (:*:) f g f
    pure f :: forall (a :: k). f a
    f = (forall (a :: k). f a) -> f f
    forall k (g :: (k -> *) -> *) (f :: k -> *).
    Applicative g =>
    (forall (a :: k). f a) -> g f
    pure forall (a :: k). f a
    f f f -> g f -> (:*:) f g f
    forall k (f :: k -> *) (g :: k -> *) (p :: k).
    f p -> g p -> (:*:) f g p
    Generics.:*: (forall (a :: k). f a) -> g f
    forall k (g :: (k -> *) -> *) (f :: k -> *).
    Applicative g =>
    (forall (a :: k). f a) -> g f
    pure forall (a :: k). f a
    f

    instance DistributiveTraversable Empty
    instance DistributiveTraversable Proxy
    instance DistributiveTraversable (Only x)
    instance DistributiveTraversable g => DistributiveTraversable (Identity g) where
       cotraverseTraversable :: (forall (x :: k). f1 (f2 x) -> f x)
    -> f1 (Identity g f2) -> Identity g f
    cotraverseTraversable w :: forall (x :: k). f1 (f2 x) -> f x
    w f :: f1 (Identity g f2)
    f = g f -> Identity g f
    forall k (g :: k -> *) (f :: k). g f -> Identity g f
    Identity ((forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable forall (x :: k). f1 (f2 x) -> f x
    w ((Identity g f2 -> g f2) -> f1 (Identity g f2) -> f1 (g f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Identity g f2 -> g f2
    forall k (g :: k -> *) (f :: k). Identity g f -> g f
    runIdentity f1 (Identity g f2)
    f))
    instance (DistributiveTraversable g, DistributiveTraversable h) => DistributiveTraversable (Product g h) where
       cotraverseTraversable :: (forall (x :: k). f1 (f2 x) -> f x)
    -> f1 (Product g h f2) -> Product g h f
    cotraverseTraversable w :: forall (x :: k). f1 (f2 x) -> f x
    w f :: f1 (Product g h f2)
    f = g f -> h f -> Product g h f
    forall k (f :: k -> *) (g :: k -> *) (a :: k).
    f a -> g a -> Product f g a
    Pair ((forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable forall (x :: k). f1 (f2 x) -> f x
    w ((Product g h f2 -> g f2) -> f1 (Product g h f2) -> f1 (g f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Product g h f2 -> g f2
    forall k (g :: k -> *) (h :: k -> *) (p :: k). Product g h p -> g p
    fst f1 (Product g h f2)
    f))
                                        ((forall (x :: k). f1 (f2 x) -> f x) -> f1 (h f2) -> h f
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable forall (x :: k). f1 (f2 x) -> f x
    w ((Product g h f2 -> h f2) -> f1 (Product g h f2) -> f1 (h f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Product g h f2 -> h f2
    forall k (g :: k -> *) (h :: k -> *) (p :: k). Product g h p -> h p
    snd f1 (Product g h f2)
    f))

    instance DistributiveTraversable f => DistributiveTraversable (Generics.M1 i c f) where
       cotraverseTraversable :: (forall (x :: k). f1 (f2 x) -> f x)
    -> f1 (M1 i c f f2) -> M1 i c f f
    cotraverseTraversable w :: forall (x :: k). f1 (f2 x) -> f x
    w f :: f1 (M1 i c f f2)
    f = f f -> M1 i c f f
    forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
    Generics.M1 ((forall (x :: k). f1 (f2 x) -> f x) -> f1 (f f2) -> f f
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable forall (x :: k). f1 (f2 x) -> f x
    w ((M1 i c f f2 -> f f2) -> f1 (M1 i c f f2) -> f1 (f f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap M1 i c f f2 -> f f2
    forall i (c :: Meta) k (f :: k -> *) (p :: k). M1 i c f p -> f p
    Generics.unM1 f1 (M1 i c f f2)
    f))
    instance DistributiveTraversable f => DistributiveTraversable (Generics.Rec1 f) where
       cotraverseTraversable :: (forall (x :: k). f1 (f2 x) -> f x) -> f1 (Rec1 f f2) -> Rec1 f f
    cotraverseTraversable w :: forall (x :: k). f1 (f2 x) -> f x
    w f :: f1 (Rec1 f f2)
    f = f f -> Rec1 f f
    forall k (f :: k -> *) (p :: k). f p -> Rec1 f p
    Generics.Rec1 ((forall (x :: k). f1 (f2 x) -> f x) -> f1 (f f2) -> f f
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable forall (x :: k). f1 (f2 x) -> f x
    w ((Rec1 f f2 -> f f2) -> f1 (Rec1 f f2) -> f1 (f f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Rec1 f f2 -> f f2
    forall k (f :: k -> *) (p :: k). Rec1 f p -> f p
    Generics.unRec1 f1 (Rec1 f f2)
    f))
    instance (DistributiveTraversable f, DistributiveTraversable g) => DistributiveTraversable ((Generics.:*:) f g) where
       cotraverseTraversable :: (forall (x :: k). f1 (f2 x) -> f x)
    -> f1 ((:*:) f g f2) -> (:*:) f g f
    cotraverseTraversable w :: forall (x :: k). f1 (f2 x) -> f x
    w f :: f1 ((:*:) f g f2)
    f = (forall (x :: k). f1 (f2 x) -> f x) -> f1 (f f2) -> f f
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable forall (x :: k). f1 (f2 x) -> f x
    w (((:*:) f g f2 -> f f2) -> f1 ((:*:) f g f2) -> f1 (f f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap (\(a :: f f2
    a Generics.:*: _) -> f f2
    a) f1 ((:*:) f g f2)
    f) f f -> g f -> (:*:) f g f
    forall k (f :: k -> *) (g :: k -> *) (p :: k).
    f p -> g p -> (:*:) f g p
    Generics.:*: (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    forall k (g :: (k -> *) -> *) (f1 :: * -> *) (f2 :: k -> *)
           (f :: k -> *).
    (DistributiveTraversable g, Traversable f1) =>
    (forall (x :: k). f1 (f2 x) -> f x) -> f1 (g f2) -> g f
    cotraverseTraversable forall (x :: k). f1 (f2 x) -> f x
    w (((:*:) f g f2 -> g f2) -> f1 ((:*:) f g f2) -> f1 (g f2)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap (\(_ Generics.:*: b :: g f2
    b) -> g f2
    b) f1 ((:*:) f g f2)
    f)

    instance Distributive Empty where
       cotraverse :: (forall (a :: k). m (p a) -> q a) -> m (Empty p) -> Empty q
    cotraverse _ _ = Empty q
    forall k (f :: k). Empty f
    Empty

    instance Distributive Proxy where
       cotraverse :: (forall (a :: k). m (p a) -> q a) -> m (Proxy p) -> Proxy q
    cotraverse _ _ = Proxy q
    forall k (t :: k). Proxy t
    Proxy

    instance Monoid x => DistributiveTraversable (Const x) where
       cotraverseTraversable :: (forall (x :: k). f1 (f2 x) -> f x) -> f1 (Const x f2) -> Const x f
    cotraverseTraversable _ f :: f1 (Const x f2)
    f = Const x f2 -> Const x f
    forall a b. Coercible a b => a -> b
    coerce (f1 (Const x f2) -> Const x f2
    forall (t :: * -> *) m. (Foldable t, Monoid m) => t m -> m
    Rank1.fold f1 (Const x f2)
    f)

    instance Distributive (Only x) where
       cotraverse :: (forall (a :: k). m (p a) -> q a) -> m (Only x p) -> Only x q
    cotraverse w :: forall (a :: k). m (p a) -> q a
    w f :: m (Only x p)
    f = q x -> Only x q
    forall k (a :: k) (f :: k -> *). f a -> Only a f
    Only (m (p x) -> q x
    forall (a :: k). m (p a) -> q a
    w ((Only x p -> p x) -> m (Only x p) -> m (p x)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Only x p -> p x
    forall k (a :: k) (f :: k -> *). Only a f -> f a
    fromOnly m (Only x p)
    f))

    instance Distributive g => Distributive (Identity g) where
       cotraverse :: (forall (a :: k). m (p a) -> q a)
    -> m (Identity g p) -> Identity g q
    cotraverse w :: forall (a :: k). m (p a) -> q a
    w f :: m (Identity g p)
    f = g q -> Identity g q
    forall k (g :: k -> *) (f :: k). g f -> Identity g f
    Identity ((forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall (a :: k). m (p a) -> q a
    w ((Identity g p -> g p) -> m (Identity g p) -> m (g p)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Identity g p -> g p
    forall k (g :: k -> *) (f :: k). Identity g f -> g f
    runIdentity m (Identity g p)
    f))

    instance (Distributive g, Distributive h) => Distributive (Product g h) where
       cotraverse :: (forall (a :: k). m (p a) -> q a)
    -> m (Product g h p) -> Product g h q
    cotraverse w :: forall (a :: k). m (p a) -> q a
    w f :: m (Product g h p)
    f = g q -> h q -> Product g h q
    forall k (f :: k -> *) (g :: k -> *) (a :: k).
    f a -> g a -> Product f g a
    Pair ((forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall (a :: k). m (p a) -> q a
    w ((Product g h p -> g p) -> m (Product g h p) -> m (g p)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Product g h p -> g p
    forall k (g :: k -> *) (h :: k -> *) (p :: k). Product g h p -> g p
    fst m (Product g h p)
    f)) ((forall (a :: k). m (p a) -> q a) -> m (h p) -> h q
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall (a :: k). m (p a) -> q a
    w ((Product g h p -> h p) -> m (Product g h p) -> m (h p)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Product g h p -> h p
    forall k (g :: k -> *) (h :: k -> *) (p :: k). Product g h p -> h p
    snd m (Product g h p)
    f))

    instance Monoid c => DistributiveTraversable (Generics.K1 i c) where
       cotraverseTraversable :: (forall (x :: k). f1 (f2 x) -> f x) -> f1 (K1 i c f2) -> K1 i c f
    cotraverseTraversable _ f :: f1 (K1 i c f2)
    f = K1 i c f2 -> K1 i c f
    forall a b. Coercible a b => a -> b
    coerce (f1 (K1 i c f2) -> K1 i c f2
    forall (t :: * -> *) m. (Foldable t, Monoid m) => t m -> m
    Rank1.fold f1 (K1 i c f2)
    f)

    instance Distributive f => Distributive (Generics.M1 i c f) where
       cotraverse :: (forall (a :: k). m (p a) -> q a) -> m (M1 i c f p) -> M1 i c f q
    cotraverse w :: forall (a :: k). m (p a) -> q a
    w f :: m (M1 i c f p)
    f = f q -> M1 i c f q
    forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
    Generics.M1 ((forall (a :: k). m (p a) -> q a) -> m (f p) -> f q
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall (a :: k). m (p a) -> q a
    w ((M1 i c f p -> f p) -> m (M1 i c f p) -> m (f p)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap M1 i c f p -> f p
    forall i (c :: Meta) k (f :: k -> *) (p :: k). M1 i c f p -> f p
    Generics.unM1 m (M1 i c f p)
    f))
    instance Distributive f => Distributive (Generics.Rec1 f) where
       cotraverse :: (forall (a :: k). m (p a) -> q a) -> m (Rec1 f p) -> Rec1 f q
    cotraverse w :: forall (a :: k). m (p a) -> q a
    w f :: m (Rec1 f p)
    f = f q -> Rec1 f q
    forall k (f :: k -> *) (p :: k). f p -> Rec1 f p
    Generics.Rec1 ((forall (a :: k). m (p a) -> q a) -> m (f p) -> f q
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall (a :: k). m (p a) -> q a
    w ((Rec1 f p -> f p) -> m (Rec1 f p) -> m (f p)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap Rec1 f p -> f p
    forall k (f :: k -> *) (p :: k). Rec1 f p -> f p
    Generics.unRec1 m (Rec1 f p)
    f))
    instance (Distributive f, Distributive g) => Distributive ((Generics.:*:) f g) where
       cotraverse :: (forall (a :: k). m (p a) -> q a) -> m ((:*:) f g p) -> (:*:) f g q
    cotraverse w :: forall (a :: k). m (p a) -> q a
    w f :: m ((:*:) f g p)
    f = (forall (a :: k). m (p a) -> q a) -> m (f p) -> f q
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall (a :: k). m (p a) -> q a
    w (((:*:) f g p -> f p) -> m ((:*:) f g p) -> m (f p)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap (\(a :: f p
    a Generics.:*: _) -> f p
    a) m ((:*:) f g p)
    f) f q -> g q -> (:*:) f g q
    forall k (f :: k -> *) (g :: k -> *) (p :: k).
    f p -> g p -> (:*:) f g p
    Generics.:*: (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    forall k (g :: (k -> *) -> *) (m :: * -> *) (p :: k -> *)
           (q :: k -> *).
    (Distributive g, Functor m) =>
    (forall (a :: k). m (p a) -> q a) -> m (g p) -> g q
    cotraverse forall (a :: k). m (p a) -> q a
    w (((:*:) f g p -> g p) -> m ((:*:) f g p) -> m (g p)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    Rank1.fmap (\(_ Generics.:*: b :: g p
    b) -> g p
    b) m ((:*:) f g p)
    f)