    {-# LANGUAGE GeneralizedNewtypeDeriving #-}
    {- |
    This module provides a type-indexed / parameterized version of the 'Functor' and 'Applicative' classes.
    -}
    module Control.Applicative.Indexed where

    import Control.Applicative (Applicative(pure, (<*>)))

    ------------------------------------------------------------------------------
    -- * type-indexed / parameterized classes
    ------------------------------------------------------------------------------

    -- | a class for a 'type-indexed' or 'paramaterized' functor
    --
    -- note: not sure what the most correct name is for this class, or if
    -- it exists in a well supported library already.
    class IndexedFunctor f where
        -- | imap is similar to fmap
        imap :: (x -> y) -- ^ function to apply to first parameter
             -> (a -> b) -- ^ function to apply to second parameter
             -> f x a    -- ^ indexed functor
             -> f y b

    -- | a class for a 'type-indexed' or 'paramaterized' applicative functors
    --
    -- note: not sure what the most correct name is for this class, or if
    -- it exists in a well supported library already.
    class (IndexedFunctor f) => IndexedApplicative f where
        -- | similar to 'pure'
        ipure   :: x -> a -> f x a
        -- | similar to '<*>'
        (<<*>>) :: f (x -> y) (a -> b) -> f x a -> f y b
        -- | similar to 'Control.Applicative.*>'
        (*>>) :: f x a -> f y b -> f y b
        (*>>) = (x -> y -> y) -> (a -> b -> b) -> f x a -> f y b -> f y b
    forall (f :: * -> * -> *) a b c x y z.
    IndexedApplicative f =>
    (a -> b -> c) -> (x -> y -> z) -> f a x -> f b y -> f c z
    liftIA2 ((y -> y) -> x -> y -> y
    forall a b. a -> b -> a
    const y -> y
    forall a. a -> a
    id) ((b -> b) -> a -> b -> b
    forall a b. a -> b -> a
    const b -> b
    forall a. a -> a
    id)
        -- | similar to 'Control.Applicative.<*'
        (<<*) :: f x a -> f y b -> f x a
        (<<*) = (x -> y -> x) -> (a -> b -> a) -> f x a -> f y b -> f x a
    forall (f :: * -> * -> *) a b c x y z.
    IndexedApplicative f =>
    (a -> b -> c) -> (x -> y -> z) -> f a x -> f b y -> f c z
    liftIA2 x -> y -> x
    forall a b. a -> b -> a
    const a -> b -> a
    forall a b. a -> b -> a
    const

    infixl 4 <<*>>, <<*, *>> -- , <<**>>

    -- | similar to 'Data.Functor.<$>'. An alias for @imap id@
    (<<$>>) :: IndexedFunctor f => (a -> b) -> f y a -> f y b
    <<$>> :: (a -> b) -> f y a -> f y b
    (<<$>>) = (y -> y) -> (a -> b) -> f y a -> f y b
    forall (f :: * -> * -> *) x y a b.
    IndexedFunctor f =>
    (x -> y) -> (a -> b) -> f x a -> f y b
    imap y -> y
    forall a. a -> a
    id

    infixl 4 <<$>>

    -- | A variant of '<<*>>' with the arguments reversed.
    (<<**>>) :: (IndexedApplicative f) => f x a -> f (x -> y) (a -> b) -> f y b
    <<**>> :: f x a -> f (x -> y) (a -> b) -> f y b
    (<<**>>) = (x -> (x -> y) -> y)
    -> (a -> (a -> b) -> b) -> f x a -> f (x -> y) (a -> b) -> f y b
    forall (f :: * -> * -> *) a b c x y z.
    IndexedApplicative f =>
    (a -> b -> c) -> (x -> y -> z) -> f a x -> f b y -> f c z
    liftIA2 (((x -> y) -> x -> y) -> x -> (x -> y) -> y
    forall a b c. (a -> b -> c) -> b -> a -> c
    flip (x -> y) -> x -> y
    forall a b. (a -> b) -> a -> b
    ($)) (((a -> b) -> a -> b) -> a -> (a -> b) -> b
    forall a b c. (a -> b -> c) -> b -> a -> c
    flip (a -> b) -> a -> b
    forall a b. (a -> b) -> a -> b
    ($))

    -- | Lift a function to actions.
    -- This function may be used as a value for `imap` in a `IndexedFunctor` instance.
    liftIA :: (IndexedApplicative f) => (a -> b) -> (x -> y) -> f a x -> f b y
    liftIA :: (a -> b) -> (x -> y) -> f a x -> f b y
    liftIA f :: a -> b
    f g :: x -> y
    g a :: f a x
    a = (a -> b) -> (x -> y) -> f (a -> b) (x -> y)
    forall (f :: * -> * -> *) x a.
    IndexedApplicative f =>
    x -> a -> f x a
    ipure a -> b
    f x -> y
    g f (a -> b) (x -> y) -> f a x -> f b y
    forall (f :: * -> * -> *) x y a b.
    IndexedApplicative f =>
    f (x -> y) (a -> b) -> f x a -> f y b
    <<*>> f a x
    a

    -- | Lift a binary function to actions.
    liftIA2 :: (IndexedApplicative f) => (a -> b -> c) -> (x -> y -> z) -> f a x -> f b y -> f c z
    liftIA2 :: (a -> b -> c) -> (x -> y -> z) -> f a x -> f b y -> f c z
    liftIA2 f :: a -> b -> c
    f g :: x -> y -> z
    g a :: f a x
    a b :: f b y
    b = (a -> b -> c) -> (x -> y -> z) -> f (a -> b -> c) (x -> y -> z)
    forall (f :: * -> * -> *) x a.
    IndexedApplicative f =>
    x -> a -> f x a
    ipure a -> b -> c
    f x -> y -> z
    g f (a -> b -> c) (x -> y -> z) -> f a x -> f (b -> c) (y -> z)
    forall (f :: * -> * -> *) x y a b.
    IndexedApplicative f =>
    f (x -> y) (a -> b) -> f x a -> f y b
    <<*>> f a x
    a f (b -> c) (y -> z) -> f b y -> f c z
    forall (f :: * -> * -> *) x y a b.
    IndexedApplicative f =>
    f (x -> y) (a -> b) -> f x a -> f y b
    <<*>> f b y
    b

    -- | Lift a binary function to actions.
    liftIA3 :: (IndexedApplicative f) => (a -> b -> c -> d) -> (w -> x -> y -> z) -> f a w -> f b x -> f c y -> f d z
    liftIA3 :: (a -> b -> c -> d)
    -> (w -> x -> y -> z) -> f a w -> f b x -> f c y -> f d z
    liftIA3 f :: a -> b -> c -> d
    f g :: w -> x -> y -> z
    g a :: f a w
    a b :: f b x
    b c :: f c y
    c = (a -> b -> c -> d)
    -> (w -> x -> y -> z) -> f (a -> b -> c -> d) (w -> x -> y -> z)
    forall (f :: * -> * -> *) x a.
    IndexedApplicative f =>
    x -> a -> f x a
    ipure a -> b -> c -> d
    f w -> x -> y -> z
    g f (a -> b -> c -> d) (w -> x -> y -> z)
    -> f a w -> f (b -> c -> d) (x -> y -> z)
    forall (f :: * -> * -> *) x y a b.
    IndexedApplicative f =>
    f (x -> y) (a -> b) -> f x a -> f y b
    <<*>> f a w
    a f (b -> c -> d) (x -> y -> z) -> f b x -> f (c -> d) (y -> z)
    forall (f :: * -> * -> *) x y a b.
    IndexedApplicative f =>
    f (x -> y) (a -> b) -> f x a -> f y b
    <<*>> f b x
    b f (c -> d) (y -> z) -> f c y -> f d z
    forall (f :: * -> * -> *) x y a b.
    IndexedApplicative f =>
    f (x -> y) (a -> b) -> f x a -> f y b
    <<*>> f c y
    c

    ------------------------------------------------------------------------------
    -- * WrappedApplicative
    ------------------------------------------------------------------------------

    -- | a wrapper which lifts a value with an 'Applicative' instance so that it can be used as an 'IndexedFunctor' or 'IndexedApplicative'
    --
    -- > d :: WrappedApplicative Maybe y Char
    -- > d = WrappedApplicative (Just succ) <<*>> WrappedApplicative (Just 'c')
    newtype WrappedApplicative f index a = WrappedApplicative { WrappedApplicative f index a -> f a
    unwrapApplicative :: f a }
        deriving (a -> WrappedApplicative f index b -> WrappedApplicative f index a
    (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    (forall a b.
     (a -> b)
     -> WrappedApplicative f index a -> WrappedApplicative f index b)
    -> (forall a b.
        a -> WrappedApplicative f index b -> WrappedApplicative f index a)
    -> Functor (WrappedApplicative f index)
    forall a b.
    a -> WrappedApplicative f index b -> WrappedApplicative f index a
    forall a b.
    (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    forall (f :: * -> *) index a b.
    Functor f =>
    a -> WrappedApplicative f index b -> WrappedApplicative f index a
    forall (f :: * -> *) index a b.
    Functor f =>
    (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    <$ :: a -> WrappedApplicative f index b -> WrappedApplicative f index a
    $c<$ :: forall (f :: * -> *) index a b.
    Functor f =>
    a -> WrappedApplicative f index b -> WrappedApplicative f index a
    fmap :: (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    $cfmap :: forall (f :: * -> *) index a b.
    Functor f =>
    (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    Functor, Functor (WrappedApplicative f index)
    a -> WrappedApplicative f index a
    Functor (WrappedApplicative f index) =>
    (forall a. a -> WrappedApplicative f index a)
    -> (forall a b.
        WrappedApplicative f index (a -> b)
        -> WrappedApplicative f index a -> WrappedApplicative f index b)
    -> (forall a b c.
        (a -> b -> c)
        -> WrappedApplicative f index a
        -> WrappedApplicative f index b
        -> WrappedApplicative f index c)
    -> (forall a b.
        WrappedApplicative f index a
        -> WrappedApplicative f index b -> WrappedApplicative f index b)
    -> (forall a b.
        WrappedApplicative f index a
        -> WrappedApplicative f index b -> WrappedApplicative f index a)
    -> Applicative (WrappedApplicative f index)
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index a
    WrappedApplicative f index (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    (a -> b -> c)
    -> WrappedApplicative f index a
    -> WrappedApplicative f index b
    -> WrappedApplicative f index c
    forall a. a -> WrappedApplicative f index a
    forall a b.
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index a
    forall a b.
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    forall a b.
    WrappedApplicative f index (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    forall a b c.
    (a -> b -> c)
    -> WrappedApplicative f index a
    -> WrappedApplicative f index b
    -> WrappedApplicative f index c
    forall (f :: * -> *).
    Functor f =>
    (forall a. a -> f a)
    -> (forall a b. f (a -> b) -> f a -> f b)
    -> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
    -> (forall a b. f a -> f b -> f b)
    -> (forall a b. f a -> f b -> f a)
    -> Applicative f
    forall (f :: * -> *) index.
    Applicative f =>
    Functor (WrappedApplicative f index)
    forall (f :: * -> *) index a.
    Applicative f =>
    a -> WrappedApplicative f index a
    forall (f :: * -> *) index a b.
    Applicative f =>
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index a
    forall (f :: * -> *) index a b.
    Applicative f =>
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    forall (f :: * -> *) index a b.
    Applicative f =>
    WrappedApplicative f index (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    forall (f :: * -> *) index a b c.
    Applicative f =>
    (a -> b -> c)
    -> WrappedApplicative f index a
    -> WrappedApplicative f index b
    -> WrappedApplicative f index c
    <* :: WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index a
    $c<* :: forall (f :: * -> *) index a b.
    Applicative f =>
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index a
    *> :: WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    $c*> :: forall (f :: * -> *) index a b.
    Applicative f =>
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    liftA2 :: (a -> b -> c)
    -> WrappedApplicative f index a
    -> WrappedApplicative f index b
    -> WrappedApplicative f index c
    $cliftA2 :: forall (f :: * -> *) index a b c.
    Applicative f =>
    (a -> b -> c)
    -> WrappedApplicative f index a
    -> WrappedApplicative f index b
    -> WrappedApplicative f index c
    <*> :: WrappedApplicative f index (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    $c<*> :: forall (f :: * -> *) index a b.
    Applicative f =>
    WrappedApplicative f index (a -> b)
    -> WrappedApplicative f index a -> WrappedApplicative f index b
    pure :: a -> WrappedApplicative f index a
    $cpure :: forall (f :: * -> *) index a.
    Applicative f =>
    a -> WrappedApplicative f index a
    $cp1Applicative :: forall (f :: * -> *) index.
    Applicative f =>
    Functor (WrappedApplicative f index)
    Applicative, Applicative (WrappedApplicative f index)
    a -> WrappedApplicative f index a
    Applicative (WrappedApplicative f index) =>
    (forall a b.
     WrappedApplicative f index a
     -> (a -> WrappedApplicative f index b)
     -> WrappedApplicative f index b)
    -> (forall a b.
        WrappedApplicative f index a
        -> WrappedApplicative f index b -> WrappedApplicative f index b)
    -> (forall a. a -> WrappedApplicative f index a)
    -> Monad (WrappedApplicative f index)
    WrappedApplicative f index a
    -> (a -> WrappedApplicative f index b)
    -> WrappedApplicative f index b
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    forall a. a -> WrappedApplicative f index a
    forall a b.
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    forall a b.
    WrappedApplicative f index a
    -> (a -> WrappedApplicative f index b)
    -> WrappedApplicative f index b
    forall (m :: * -> *).
    Applicative m =>
    (forall a b. m a -> (a -> m b) -> m b)
    -> (forall a b. m a -> m b -> m b)
    -> (forall a. a -> m a)
    -> Monad m
    forall (f :: * -> *) index.
    Monad f =>
    Applicative (WrappedApplicative f index)
    forall (f :: * -> *) index a.
    Monad f =>
    a -> WrappedApplicative f index a
    forall (f :: * -> *) index a b.
    Monad f =>
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    forall (f :: * -> *) index a b.
    Monad f =>
    WrappedApplicative f index a
    -> (a -> WrappedApplicative f index b)
    -> WrappedApplicative f index b
    return :: a -> WrappedApplicative f index a
    $creturn :: forall (f :: * -> *) index a.
    Monad f =>
    a -> WrappedApplicative f index a
    >> :: WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    $c>> :: forall (f :: * -> *) index a b.
    Monad f =>
    WrappedApplicative f index a
    -> WrappedApplicative f index b -> WrappedApplicative f index b
    >>= :: WrappedApplicative f index a
    -> (a -> WrappedApplicative f index b)
    -> WrappedApplicative f index b
    $c>>= :: forall (f :: * -> *) index a b.
    Monad f =>
    WrappedApplicative f index a
    -> (a -> WrappedApplicative f index b)
    -> WrappedApplicative f index b
    $cp1Monad :: forall (f :: * -> *) index.
    Monad f =>
    Applicative (WrappedApplicative f index)
    Monad, WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    (WrappedApplicative f index a
     -> WrappedApplicative f index a -> Bool)
    -> (WrappedApplicative f index a
        -> WrappedApplicative f index a -> Bool)
    -> Eq (WrappedApplicative f index a)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall (f :: * -> *) index a.
    Eq (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    /= :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    $c/= :: forall (f :: * -> *) index a.
    Eq (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    == :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    $c== :: forall (f :: * -> *) index a.
    Eq (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    Eq, Eq (WrappedApplicative f index a)
    Eq (WrappedApplicative f index a) =>
    (WrappedApplicative f index a
     -> WrappedApplicative f index a -> Ordering)
    -> (WrappedApplicative f index a
        -> WrappedApplicative f index a -> Bool)
    -> (WrappedApplicative f index a
        -> WrappedApplicative f index a -> Bool)
    -> (WrappedApplicative f index a
        -> WrappedApplicative f index a -> Bool)
    -> (WrappedApplicative f index a
        -> WrappedApplicative f index a -> Bool)
    -> (WrappedApplicative f index a
        -> WrappedApplicative f index a -> WrappedApplicative f index a)
    -> (WrappedApplicative f index a
        -> WrappedApplicative f index a -> WrappedApplicative f index a)
    -> Ord (WrappedApplicative f index a)
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Ordering
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> WrappedApplicative f index a
    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 (f :: * -> *) index a.
    Ord (f a) =>
    Eq (WrappedApplicative f index a)
    forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Ordering
    forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> WrappedApplicative f index a
    min :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> WrappedApplicative f index a
    $cmin :: forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> WrappedApplicative f index a
    max :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> WrappedApplicative f index a
    $cmax :: forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> WrappedApplicative f index a
    >= :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    $c>= :: forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    > :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    $c> :: forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    <= :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    $c<= :: forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    < :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    $c< :: forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Bool
    compare :: WrappedApplicative f index a
    -> WrappedApplicative f index a -> Ordering
    $ccompare :: forall (f :: * -> *) index a.
    Ord (f a) =>
    WrappedApplicative f index a
    -> WrappedApplicative f index a -> Ordering
    $cp1Ord :: forall (f :: * -> *) index a.
    Ord (f a) =>
    Eq (WrappedApplicative f index a)
    Ord, ReadPrec [WrappedApplicative f index a]
    ReadPrec (WrappedApplicative f index a)
    Int -> ReadS (WrappedApplicative f index a)
    ReadS [WrappedApplicative f index a]
    (Int -> ReadS (WrappedApplicative f index a))
    -> ReadS [WrappedApplicative f index a]
    -> ReadPrec (WrappedApplicative f index a)
    -> ReadPrec [WrappedApplicative f index a]
    -> Read (WrappedApplicative f index a)
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    forall (f :: * -> *) index a.
    Read (f a) =>
    ReadPrec [WrappedApplicative f index a]
    forall (f :: * -> *) index a.
    Read (f a) =>
    ReadPrec (WrappedApplicative f index a)
    forall (f :: * -> *) index a.
    Read (f a) =>
    Int -> ReadS (WrappedApplicative f index a)
    forall (f :: * -> *) index a.
    Read (f a) =>
    ReadS [WrappedApplicative f index a]
    readListPrec :: ReadPrec [WrappedApplicative f index a]
    $creadListPrec :: forall (f :: * -> *) index a.
    Read (f a) =>
    ReadPrec [WrappedApplicative f index a]
    readPrec :: ReadPrec (WrappedApplicative f index a)
    $creadPrec :: forall (f :: * -> *) index a.
    Read (f a) =>
    ReadPrec (WrappedApplicative f index a)
    readList :: ReadS [WrappedApplicative f index a]
    $creadList :: forall (f :: * -> *) index a.
    Read (f a) =>
    ReadS [WrappedApplicative f index a]
    readsPrec :: Int -> ReadS (WrappedApplicative f index a)
    $creadsPrec :: forall (f :: * -> *) index a.
    Read (f a) =>
    Int -> ReadS (WrappedApplicative f index a)
    Read, Int -> WrappedApplicative f index a -> ShowS
    [WrappedApplicative f index a] -> ShowS
    WrappedApplicative f index a -> String
    (Int -> WrappedApplicative f index a -> ShowS)
    -> (WrappedApplicative f index a -> String)
    -> ([WrappedApplicative f index a] -> ShowS)
    -> Show (WrappedApplicative f index a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall (f :: * -> *) index a.
    Show (f a) =>
    Int -> WrappedApplicative f index a -> ShowS
    forall (f :: * -> *) index a.
    Show (f a) =>
    [WrappedApplicative f index a] -> ShowS
    forall (f :: * -> *) index a.
    Show (f a) =>
    WrappedApplicative f index a -> String
    showList :: [WrappedApplicative f index a] -> ShowS
    $cshowList :: forall (f :: * -> *) index a.
    Show (f a) =>
    [WrappedApplicative f index a] -> ShowS
    show :: WrappedApplicative f index a -> String
    $cshow :: forall (f :: * -> *) index a.
    Show (f a) =>
    WrappedApplicative f index a -> String
    showsPrec :: Int -> WrappedApplicative f index a -> ShowS
    $cshowsPrec :: forall (f :: * -> *) index a.
    Show (f a) =>
    Int -> WrappedApplicative f index a -> ShowS
    Show)

    instance (Functor f) => IndexedFunctor (WrappedApplicative f) where
        imap :: (x -> y)
    -> (a -> b) -> WrappedApplicative f x a -> WrappedApplicative f y b
    imap f :: x -> y
    f g :: a -> b
    g (WrappedApplicative a :: f a
    a) = f b -> WrappedApplicative f y b
    forall (f :: * -> *) index a. f a -> WrappedApplicative f index a
    WrappedApplicative ((a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    g f a
    a)

    instance (Applicative f) => IndexedApplicative (WrappedApplicative f) where
        ipure :: x -> a -> WrappedApplicative f x a
    ipure x :: x
    x a :: a
    a = f a -> WrappedApplicative f x a
    forall (f :: * -> *) index a. f a -> WrappedApplicative f index a
    WrappedApplicative (a -> f a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure a
    a)
        (WrappedApplicative f :: f (a -> b)
    f) <<*>> :: WrappedApplicative f (x -> y) (a -> b)
    -> WrappedApplicative f x a -> WrappedApplicative f y b
    <<*>> (WrappedApplicative a :: f a
    a) = f b -> WrappedApplicative f y b
    forall (f :: * -> *) index a. f a -> WrappedApplicative f index a
    WrappedApplicative (f (a -> b)
    f f (a -> b) -> f a -> f b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> f a
    a)