{-# 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 Optics.Internal.Indexed
import Optics.Internal.Optic
import Optics.Internal.Profunctor

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