    -- |
    -- Module: Optics.Review
    -- Description: A backwards 'Optics.Getter.Getter', i.e. a function.
    --
    -- A 'Review' is a backwards 'Optics.Getter.Getter', i.e. a
    -- @'Review' T B@ is just a function @B -> T@.
    --
    module Optics.Review
      (
      -- * Formation
        Review

      -- * Introduction
      , unto

      -- * Elimination
      , review

      -- * Computation
      -- |
      --
      -- @
      -- 'review' ('unto' f) = f
      -- @

      -- * Subtyping
      , A_Review
      -- | <<diagrams/Review.png Review in the optics hierarchy>>
      )
      where

    import Data.Profunctor.Indexed

    import Optics.Internal.Bi
    import Optics.Internal.Optic

    -- | Type synonym for a review.
    type Review t b = Optic' A_Review NoIx t b

    -- | Retrieve the value targeted by a 'Review'.
    --
    -- >>> review _Left "hi"
    -- Left "hi"
    review :: Is k A_Review => Optic' k is t b -> b -> t
    review :: forall (k :: OpticKind) (is :: IxList) (t :: OpticKind)
           (b :: OpticKind).
    Is k A_Review =>
    Optic' k is t b -> b -> t
    review Optic' k is t b
    o = Tagged (Curry is (ZonkAny 0)) t t -> t
    forall (i :: OpticKind) (a :: OpticKind) (b :: OpticKind).
    Tagged i a b -> b
    unTagged (Tagged (Curry is (ZonkAny 0)) t t -> t)
    -> (Tagged (ZonkAny 0) b b -> Tagged (Curry is (ZonkAny 0)) t t)
    -> Tagged (ZonkAny 0) b b
    -> t
    forall (b :: OpticKind) (c :: OpticKind) (a :: OpticKind).
    Coercible b c =>
    (b -> c) -> (a -> b) -> a -> c
    #. Optic A_Review is t t b b
    -> Optic_
         A_Review Tagged (ZonkAny 0) (Curry is (ZonkAny 0)) t t b b
    forall (p :: OpticKind -> OpticKind -> OpticKind -> OpticKind)
           (k :: OpticKind) (is :: IxList) (s :: OpticKind) (t :: OpticKind)
           (a :: OpticKind) (b :: OpticKind) (i :: OpticKind).
    Profunctor p =>
    Optic k is s t a b -> Optic_ k p i (Curry is i) s t a b
    getOptic (forall (destKind :: OpticKind) (srcKind :: OpticKind)
           (is :: IxList) (s :: OpticKind) (t :: OpticKind) (a :: OpticKind)
           (b :: OpticKind).
    Is srcKind destKind =>
    Optic srcKind is s t a b -> Optic destKind is s t a b
    castOptic @A_Review Optic' k is t b
    o) (Tagged (ZonkAny 0) b b -> t)
    -> (b -> Tagged (ZonkAny 0) b b) -> b -> t
    forall (a :: OpticKind) (b :: OpticKind) (c :: OpticKind).
    Coercible a b =>
    (b -> c) -> (a -> b) -> a -> c
    .# b -> Tagged (ZonkAny 0) b b
    forall (i :: OpticKind) (a :: OpticKind) (b :: OpticKind).
    b -> Tagged i a b
    Tagged
    {-# INLINE review #-}

    -- | An analogue of 'Optics.Getter.to' for reviews.
    unto :: (b -> t) -> Review t b
    unto :: forall (b :: OpticKind) (t :: OpticKind). (b -> t) -> Review t b
    unto b -> t
    f = (forall (p :: OpticKind -> OpticKind -> OpticKind -> OpticKind)
            (i :: OpticKind).
     Profunctor p =>
     Optic_ A_Review p i (Curry NoIx i) t t b b)
    -> Optic A_Review NoIx t t b b
    forall (k :: OpticKind) (is :: IxList) (s :: OpticKind)
           (t :: OpticKind) (a :: OpticKind) (b :: OpticKind).
    (forall (p :: OpticKind -> OpticKind -> OpticKind -> OpticKind)
            (i :: OpticKind).
     Profunctor p =>
     Optic_ k p i (Curry is i) s t a b)
    -> Optic k is s t a b
    Optic (p i b t -> p i t t
    forall (p :: OpticKind -> OpticKind -> OpticKind -> OpticKind)
           (i :: OpticKind) (a :: OpticKind) (c :: OpticKind)
           (b :: OpticKind).
    (Profunctor p, Bifunctor p) =>
    p i a c -> p i b c
    lphantom (p i b t -> p i t t) -> (p i b b -> p i b t) -> p i b b -> p i t t
    forall (b :: OpticKind) (c :: OpticKind) (a :: OpticKind).
    (b -> c) -> (a -> b) -> a -> c
    . (b -> t) -> p i b b -> p i b t
    forall (c :: OpticKind) (d :: OpticKind) (i :: OpticKind)
           (b :: OpticKind).
    (c -> d) -> p i b c -> p i b d
    forall (p :: OpticKind -> OpticKind -> OpticKind -> OpticKind)
           (c :: OpticKind) (d :: OpticKind) (i :: OpticKind)
           (b :: OpticKind).
    Profunctor p =>
    (c -> d) -> p i b c -> p i b d
    rmap b -> t
    f)
    {-# INLINE unto #-}

    -- $setup
    -- >>> import Optics.Core