{-# OPTIONS_HADDOCK not-home #-}

-- | Internal implementation details of indexed setters.
--
-- This module is intended for internal use only, and may change without warning
-- in subsequent releases.
module Optics.Internal.IxSetter where

import Data.Profunctor.Indexed

import Optics.Internal.Indexed.Classes
import Optics.Internal.Optic

-- | Internal implementation of 'Optics.IxSetter.imapped'.
imapped__
  :: (Mapping p, FunctorWithIndex i f)
  => Optic__ p j (i -> j) (f a) (f b) a b
imapped__ :: forall (p :: * -> * -> * -> *) i (f :: * -> *) j a b.
(Mapping p, FunctorWithIndex i f) =>
Optic__ p j (i -> j) (f a) (f b) a b
imapped__ = forall (p :: * -> * -> * -> *) i a b s t j.
Profunctor p =>
(p i a b -> p i s t) -> (p i a b -> p j s t) -> p i a b -> p j s t
conjoined__ (forall (p :: * -> * -> * -> *) a b s t i.
Mapping p =>
((a -> b) -> s -> t) -> p i a b -> p i s t
roam forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap) (forall (p :: * -> * -> * -> *) i a b s t j.
Mapping p =>
((i -> a -> b) -> s -> t) -> p j a b -> p (i -> j) s t
iroam forall i (f :: * -> *) a b.
FunctorWithIndex i f =>
(i -> a -> b) -> f a -> f b
imap)
{-# INLINE imapped__ #-}