-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Haskell 2022 Lens Families
--   
--   This package provides first class(†) functional references in Van
--   Laarhoven style supporting the following optics:
--   
--   
--   
- Lenses (view, over)
--   
- Traversals (toListOf, matching, over)
--   
- Setters (over)
--   
- Grates (zipWithOf, under, review)
--   
- Resetters (under)
--   
- Adapters (view, review)
--   
- Grids (toListOf, over / under, review)
--   
- Prisms (matching, over / under, review)
--   
- Getters (view)
--   
- Folders (toListOf)
--   
- Reviewers (review)
--   
--   
--   (†) For optimal first-class support use the lens-family
--   package with rank 2 / rank N polymorphism. Lens.Family.Clone
--   allows for first-class support of lenses and traversals for those who
--   cannot support rank 2 polymorphism.
@package lens-family-core
@version 2.0.0

-- | Caution: Improper use of this module can lead to unexpected
--   behaviour if the preconditions of the functions are not met.
module Lens.Family.Unchecked

-- | 
--   adapter :: (s -> a) -> (b -> t) -> Adapter s t a b
--   
--   
--   Build an adapter from an isomorphism family.
--   
--   Caution: In order for the generated adapter family to be
--   well-defined, you must ensure that the two isomorphism laws hold:
--   
--   
--   
- 
yin . yang === id

--   
- 
yang . yin === id

--   
adapter :: (Functor f, Functor g) => (s -> a) -> (b -> t) -> AdapterLike f g s t a b

-- | 
--   lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
--   
--   
--   Build a lens from a getter and setter family.
--   
--   Caution: In order for the generated lens family to be
--   well-defined, you must ensure that the three lens laws hold:
--   
--   
--   
- 
getter (setter s a) === a

--   
- 
setter s (getter s) === s

--   
- 
setter (setter s a1) a2 === setter s a2

--   
lens :: Functor f => (s -> a) -> (s -> b -> t) -> LensLike f s t a b

-- | 
--   prism :: (s -> Either t a) -> (b -> t) -> Prism s t a b
--   
--   
--   Build a prism from a matcher and reviewer family.
--   
--   Caution: In order for the generated prism family to be
--   well-defined, you must ensure that the three prism laws hold:
--   
--   
--   
- 
matcher (reviewer b) === Right b

--   
- 
(id ||| reviewer) (matcher s) === s

--   
- 
left matcher (matcher s) === left Left (matcher s)

--   
prism :: (Applicative f, Traversable g) => (s -> Either t a) -> (b -> t) -> AdapterLike f g s t a b

-- | 
--   grate :: (((s -> a) -> b) -> t) -> Grate s t a b
--   
--   
--   Build a grate from a grater family.
--   
--   Caution: In order for the generated grate family to be
--   well-defined, you must ensure that the two grater laws hold:
--   
--   
--   
- 
grater ($ s) === s

--   
- 
grater (k -> h (k . grater)) === grater (k -> h ($
--   k))

--   
--   
--   Note: The grater laws are that of an algebra for the parameterised
--   continuation monad, PCont.
grate :: Functor g => (((s -> a) -> b) -> t) -> GrateLike g s t a b

-- | setting promotes a "semantic editor combinator" to a
--   modify-only lens. To demote a lens to a semantic edit combinator, use
--   the section (l %~) or over l from
--   Lens.Family.
--   
--   
--   >>> [("The",0),("quick",1),("brown",1),("fox",2)] & setting map . fstL %~ length
--   [(3,0),(5,1),(5,1),(3,2)]
--   
--   
--   Caution: In order for the generated family to be well-defined,
--   you must ensure that the two functors laws hold:
--   
--   
--   
- 
sec id === id

--   
- 
sec f . sec g === sec (f . g)

--   
setting :: Identical f => ((a -> b) -> s -> t) -> LensLike f s t a b

-- | resetting promotes a "semantic editor combinator" to a form of
--   grate that can only lift unary functions. To demote a grate to a
--   semantic edit combinator, use under l from
--   Lens.Family.
--   
--   Caution: In order for the generated family to be well-defined,
--   you must ensure that the two functors laws hold:
--   
--   
--   
- 
sec id === id

--   
- 
sec f . sec g === sec (f . g)

--   
resetting :: Identical g => ((a -> b) -> s -> t) -> GrateLike g s t a b
type AdapterLike f g s t a b = (g a -> f b) -> (g s -> f t)
type AdapterLike' f g s a = (g a -> f a) -> (g s -> f s)
type LensLike f s t a b = (a -> f b) -> (s -> f t)
type LensLike' f s a = (a -> f a) -> (s -> f s)
type GrateLike g s t a b = (g a -> b) -> (g s -> t)
type GrateLike' g s a = (g a -> a) -> (g s -> s)
class (Traversable f, Applicative f) => Identical f

-- | This is the main module for end-users of lens-families-core. If you
--   are not building your own optics such as lenses, traversals, grates,
--   etc., but just using optics made by others, this is the only module
--   you need.
module Lens.Family

-- | 
--   to :: (s -> a) -> Getter s t a b
--   
--   
--   to promotes a projection function to a read-only lens called a
--   getter. To demote a lens to a projection function, use the section
--   (^.l) or view l.
--   
--   
--   >>> (3 :+ 4, "example")^._1.to(abs)
--   5.0 :+ 0.0
--   
to :: Phantom f => (s -> a) -> LensLike f s t a b

-- | 
--   view :: Getter s t a b -> s -> a
--   
--   
--   Demote a lens or getter to a projection function.
--   
--   
--   view :: Monoid a => Fold s t a b -> s -> a
--   
--   
--   Returns the monoidal summary of a traversal or a fold.
view :: FoldLike a s t a b -> s -> a

-- | 
--   (^.) :: s -> Getter s t a b -> a
--   
--   
--   Access the value referenced by a getter or lens.
--   
--   
--   (^.) :: Monoid a => s -> Fold s t a b -> a
--   
--   
--   Access the monoidal summary referenced by a traversal or a fold.
(^.) :: s -> FoldLike a s t a b -> a
infixl 8 ^.

-- | 
--   folding :: (s -> [a]) -> Fold s t a b
--   
--   
--   folding promotes a "toList" function to a read-only traversal
--   called a fold.
--   
--   To demote a traversal or fold to a "toList" function use the section
--   (^..l) or toListOf l.
folding :: (Foldable g, Phantom f, Applicative f) => (s -> g a) -> LensLike f s t a b

-- | 
--   views :: Monoid r => Fold s t a b -> (a -> r) -> s -> r
--   
--   
--   Given a fold or traversal, return the foldMap of all the values
--   using the given function.
--   
--   
--   views :: Getter s t a b -> (a -> r) -> s -> r
--   
--   
--   views is not particularly useful for getters or lenses, but
--   given a getter or lens, it returns the referenced value passed through
--   the given function.
--   
--   
--   views l f s = f (view l s)
--   
views :: FoldLike r s t a b -> (a -> r) -> s -> r

-- | 
--   (^..) :: s -> Fold s t a b -> [a]
--   
--   
--   Returns a list of all of the referenced values in order.
(^..) :: s -> FoldLike [a] s t a b -> [a]
infixl 8 ^..

-- | 
--   (^?) :: s -> Fold s t a b -> Maybe a
--   
--   
--   Returns Just the first referenced value. Returns Nothing
--   if there are no referenced values.
(^?) :: s -> FoldLike (First a) s t a b -> Maybe a
infixl 8 ^?

-- | 
--   toListOf :: Fold s t a b -> s -> [a]
--   
--   
--   Returns a list of all of the referenced values in order.
toListOf :: FoldLike [a] s t a b -> s -> [a]

-- | 
--   allOf :: Fold s t a b -> (a -> Bool) -> s -> Bool
--   
--   
--   Returns true if all of the referenced values satisfy the given
--   predicate.
allOf :: FoldLike All s t a b -> (a -> Bool) -> s -> Bool

-- | 
--   anyOf :: Fold s t a b -> (a -> Bool) -> s -> Bool
--   
--   
--   Returns true if any of the referenced values satisfy the given
--   predicate.
anyOf :: FoldLike Any s t a b -> (a -> Bool) -> s -> Bool

-- | 
--   firstOf :: Fold s t a b -> s -> Maybe a
--   
--   
--   Returns Just the first referenced value. Returns Nothing
--   if there are no referenced values. See ^? for an infix version
--   of firstOf
firstOf :: FoldLike (First a) s t a b -> s -> Maybe a

-- | 
--   lastOf :: Fold s t a b -> s -> Maybe a
--   
--   
--   Returns Just the last referenced value. Returns Nothing
--   if there are no referenced values.
lastOf :: FoldLike (Last a) s t a b -> s -> Maybe a

-- | 
--   sumOf :: Num a => Fold s t a b -> s -> a
--   
--   
--   Returns the sum of all the referenced values.
sumOf :: Num a => FoldLike (Sum a) s t a b -> s -> a

-- | 
--   productOf :: Num a => Fold s t a b -> s -> a
--   
--   
--   Returns the product of all the referenced values.
productOf :: Num a => FoldLike (Product a) s t a b -> s -> a

-- | 
--   lengthOf :: Num r => Fold s t a b -> s -> r
--   
--   
--   Counts the number of references in a traversal or fold for the input.
lengthOf :: Num r => FoldLike (Sum r) s t a b -> s -> r

-- | 
--   nullOf :: Fold s t a b -> s -> Bool
--   
--   
--   Returns true if the number of references in the input is zero.
nullOf :: FoldLike All s t a b -> s -> Bool

-- | 
--   matching :: Traversal s t a b -> s -> Either t a
--   
--   
--   Returns Right of the first referenced value. Returns
--   Left the original value when there are no referenced values. In
--   case there are no referenced values, the result might have a fresh
--   type parameter, thereby proving the original value had no referenced
--   values.
matching :: LensLike (Either a) s t a b -> s -> Either t a

-- | 
--   over :: Setter s t a b -> (a -> b) -> s -> t
--   
--   
--   Demote a setter to a semantic editor combinator.
--   
--   
--   over :: Prism s t a b -> Reviwer s t a b
--   over :: Grid s t a b -> Grate s t a b
--   over :: Adapter s t a b -> Grate s t a b
--   
--   
--   Covert an AdapterLike optic into a GrateLike optic.
over :: ASetter s t a b -> (a -> b) -> s -> t

-- | Modify all referenced fields.
(%~) :: ASetter s t a b -> (a -> b) -> s -> t
infixr 4 %~

-- | Set all referenced fields to the given value.
set :: ASetter s t a b -> b -> s -> t

-- | Set all referenced fields to the given value.
(.~) :: ASetter s t a b -> b -> s -> t
infixr 4 .~

-- | 
--   review :: Grate s t a b -> b -> t
--   review :: Reviewer s t a b -> b -> t
--   
review :: GrateLike (Constant ()) s t a b -> b -> t

-- | 
--   zipWithOf :: Grate s t a b -> (a -> a -> b) -> s -> s -> t
--   
--   
--   Returns a binary instance of a grate.
--   
--   
--   zipWithOf l f x y = degrating l (k -> f (k x) (k y))
--   
zipWithOf :: GrateLike (Prod Identity Identity) s t a b -> (a -> a -> b) -> s -> s -> t

-- | 
--   degrating :: Grate s t a b -> ((s -> a) -> b) -> t
--   
--   
--   Demote a grate to its normal, higher-order function, form.
--   
--   
--   degrating . grate = id
--   grate . degrating = id
--   
degrating :: AGrate s t a b -> ((s -> a) -> b) -> t

-- | 
--   under :: Resetter s t a b -> (a -> b) -> s -> t
--   
--   
--   Demote a resetter to a semantic editor combinator.
--   
--   
--   under :: Prism s t a b -> Traversal s t a b
--   under :: Grid s t a b -> Traversal s t a b
--   under :: Adapter s t a b -> Lens s t a b
--   
--   
--   Covert an AdapterLike optic into a LensLike optic.
--   
--   Note: this function is unrelated to the lens package's under
--   function.
under :: AResetter s t a b -> (a -> b) -> s -> t

-- | 
--   reset :: Resetter s t a b -> b -> s -> t
--   
--   
--   Set all referenced fields to the given value.
reset :: AResetter s t a b -> b -> s -> t

-- | A flipped version of ($).
(&) :: s -> (s -> t) -> t
infixl 1 &
(+~) :: Num a => ASetter s t a a -> a -> s -> t
infixr 4 +~
(*~) :: Num a => ASetter s t a a -> a -> s -> t
infixr 4 *~
(-~) :: Num a => ASetter s t a a -> a -> s -> t
infixr 4 -~
(//~) :: Fractional a => ASetter s t a a -> a -> s -> t
infixr 4 //~
(&&~) :: ASetter s t Bool Bool -> Bool -> s -> t
infixr 4 &&~
(||~) :: ASetter s t Bool Bool -> Bool -> s -> t
infixr 4 ||~

-- | Monoidally append a value to all referenced fields.
(<>~) :: Monoid a => ASetter s t a a -> a -> s -> t
infixr 4 <>~
type AdapterLike f g s t a b = (g a -> f b) -> (g s -> f t)
type AdapterLike' f g s a = (g a -> f a) -> (g s -> f s)
type LensLike f s t a b = (a -> f b) -> (s -> f t)
type LensLike' f s a = (a -> f a) -> (s -> f s)
type FoldLike r s t a b = LensLike (Constant r) s t a b
type FoldLike' r s a = LensLike' (Constant r) s a
type GrateLike g s t a b = (g a -> b) -> (g s -> t)
type GrateLike' g s a = (g a -> a) -> (g s -> s)
type AGrate s t a b = GrateLike (PCont b a) s t a b
type AGrate' s a = GrateLike' (PCont a a) s a
type ASetter s t a b = LensLike Identity s t a b
type ASetter' s a = LensLike' Identity s a
type AResetter s t a b = GrateLike Identity s t a b
type AResetter' s a = GrateLike' Identity s a
data PCont i j a
data First a
data Last a
class Functor f => Phantom f
data Constant a (b :: k)
data Identity a
type Prod = Product
data All
data Any
data Sum a
data Product a
instance GHC.Base.Monoid (Lens.Family.Last a)
instance GHC.Base.Semigroup (Lens.Family.Last a)
instance GHC.Base.Monoid (Lens.Family.First a)
instance GHC.Base.Semigroup (Lens.Family.First a)
instance GHC.Base.Functor (Lens.Family.PCont i j)

-- | This module contains lenses, prisms, grids, grates and traversals for
--   common structures in Haskell. It also contains the combinators for
--   various kinds of optics.
--   
--   A Function name with ' is a grate variant of a grid, and a
--   function name with _ is a traversal variants of a grid or
--   prism. For example, both' is the grate variant of both
--   while both_ is the traversal variant.
module Lens.Family.Stock

-- | 
--   _1 :: Lens (a, r) (b, r) a b
--   
--   
--   Lens on the first element of a pair.
_1 :: Functor f => LensLike f (a, r) (b, r) a b

-- | 
--   _2 :: Lens (r, a) (r, b) a b
--   
--   
--   Lens on the second element of a pair.
_2 :: Functor f => LensLike f (r, a) (r, b) a b

-- | 
--   chosen :: Lens (Either a a) (Either b b) a b
--   
--   
--   Lens on the Left or Right element of an (Either a a).
chosen :: Functor f => LensLike f (Either a a) (Either b b) a b

-- | 
--   ix :: Eq k => k -> Lens' (k -> v) v
--   
--   
--   Lens on a given point of a function.
ix :: (Eq k, Functor f) => k -> LensLike' f (k -> v) v

-- | 
--   at :: Ord k => k -> Lens' (Map.Map k v) (Maybe v)
--   
--   
--   Lens on a given point of a Map.
at :: (Ord k, Functor f) => k -> LensLike' f (Map k v) (Maybe v)

-- | 
--   intAt :: Int -> Lens (IntMap.IntMap v) (Maybe v)
--   
--   
--   Lens on a given point of a IntMap.
intAt :: Functor f => Int -> LensLike' f (IntMap v) (Maybe v)

-- | 
--   at :: Ord k => k -> Lens' (Map.Map k v) (Maybe v)
--   
--   
--   Lens providing strict access to a given point of a Map.
at' :: (Ord k, Functor f) => k -> LensLike' f (Map k v) (Maybe v)

-- | 
--   intAt :: Int -> Lens (IntMap.IntMap v) (Maybe v)
--   
--   
--   Lens providing strict access to a given point of a IntMap.
intAt' :: Functor f => Int -> LensLike' f (IntMap v) (Maybe v)

-- | 
--   contains :: Ord => k -> Lens' (Set.Set k) Bool
--   
--   
--   Lens on a given point of a Set.
contains :: (Ord k, Functor f) => k -> LensLike' f (Set k) Bool

-- | 
--   intContains :: Int -> Lens' IntSet.IntSet Bool
--   
--   
--   Lens on a given point of a IntSet.
intContains :: Functor f => Int -> LensLike' f IntSet Bool

-- | 
--   lft :: Prism (Either a r) (Either b r) a b
--   
--   
--   A prism on the Left element of an Either.
lft :: (Applicative f, Traversable g) => AdapterLike f g (Either a r) (Either b r) a b

-- | 
--   rgt :: Prism (Either r a) (Either r b) a b
--   
--   
--   A prism on the Right element of an Either.
rgt :: (Applicative f, Traversable g) => AdapterLike f g (Either r a) (Either r b) a b

-- | 
--   some :: Prism (Maybe a) (Maybe b) a b
--   
--   
--   A prism on the Just element of a Maybe.
some :: (Applicative f, Traversable g) => AdapterLike f g (Maybe a) (Maybe b) a b

-- | 
--   none :: Prism' (Maybe a) ()
--   
--   
--   A prism on the Nothing element of a Maybe.
none :: (Applicative f, Traversable g) => AdapterLike' f g (Maybe a) ()

-- | 
--   both :: Grid (a,a) (b,b) a b
--   
--   
--   A grid on both elements of a pair (a,a).
both :: (Applicative f, Functor g) => AdapterLike f g (a, a) (b, b) a b

-- | 
--   bend :: FiniteBits b => Grid' b Bool
--   
--   
--   A grid from the most significant bit to the least significant bit of a
--   FiniteBits type.
--   
--   Big endian order.
bend :: (FiniteBits b, Applicative f, Functor g) => AdapterLike' f g b Bool

-- | 
--   lend :: FiniteBits b => Grid' b Bool
--   
--   
--   A grid from the least significant bit to the most significant bit of a
--   FiniteBits type.
--   
--   Little endian order.
lend :: (FiniteBits b, Applicative f, Functor g) => AdapterLike' f g b Bool

-- | 
--   cod :: Grate (r -> a) (r -> b) a b
--   
--   
--   A grate accessing the codomain of a function.
cod :: Functor g => GrateLike g (r -> a) (r -> b) a b

-- | 
--   both' :: Grate (a,a) (b,b) a b
--   
--   
--   A grate on both elements of a pair (a,a).
--   
--   
--   both' = over both
--   
both' :: Functor g => GrateLike g (a, a) (b, b) a b

-- | 
--   bend' :: FiniteBits b => Grate' b Bool
--   
--   
--   A grate from the most significant bit to the least significant bit of
--   a FiniteBits type.
--   
--   Big endian order.
--   
--   
--   bend' = over bend
--   
bend' :: (FiniteBits b, Functor g) => GrateLike' g b Bool

-- | 
--   lend' :: FiniteBits b => Grate' b Bool
--   
--   
--   A grate from the least significant bit to the most significant bit of
--   a FiniteBits type.
--   
--   Little endian order.
--   
--   
--   lend' = over lend
--   
lend' :: (FiniteBits b, Functor g) => GrateLike' g b Bool

-- | 
--   both_ :: Traversal (a,a) (b,b) a b
--   
--   
--   Traversals on both elements of a pair (a,a).
--   
--   
--   both_ = under both
--   
both_ :: Applicative f => LensLike f (a, a) (b, b) a b

-- | 
--   bend_ :: FiniteBits b => Traversal' b Bool
--   
--   
--   A traversal from the most significant bit to the least significant bit
--   of a FiniteBits type.
--   
--   Big endian order.
--   
--   
--   bend_ = under bend
--   
bend_ :: (FiniteBits b, Applicative f) => LensLike' f b Bool

-- | 
--   lend_ :: FiniteBits b => Traversal' b Bool
--   
--   
--   A traversal from the least significant bit to the most significant bit
--   of a FiniteBits type.
--   
--   Little endian order.
--   
--   
--   lend_ = under lend
--   
lend_ :: (FiniteBits b, Applicative f) => LensLike' f b Bool

-- | 
--   lft_ :: Traversal (Either a r) (Either b r) a b
--   
--   
--   Traversal on the Left element of an Either.
--   
--   
--   lft_ = under lft
--   
lft_ :: Applicative f => LensLike f (Either a r) (Either b r) a b

-- | 
--   rgt_ :: Traversal (Either r a) (Either r b) a b
--   
--   
--   Traversal on the Right element of an Either.
--   
--   
--   rgt_ = under rgt
--   
rgt_ :: Applicative f => LensLike f (Either r a) (Either r b) a b

-- | 
--   some_ :: Traversal (Maybe a) (Maybe b) a b
--   
--   
--   Traversal on the Just element of a Maybe.
some_ :: Applicative f => LensLike f (Maybe a) (Maybe b) a b

-- | 
--   none_ :: Traversal' (Maybe a) ()
--   
--   
--   Traversal on the Nothing element of a Maybe.
none_ :: Applicative f => LensLike' f (Maybe a) ()

-- | 
--   ignored :: Traversal s s a b
--   
--   
--   The empty traversal on any type.
ignored :: Applicative f => null -> s -> f s

-- | 
--   mapped :: Functor h => Setter (h a) (h b) a b
--   
--   
--   An SEC referencing the parameter of a functor.
mapped :: (Identical f, Functor h) => LensLike f (h a) (h b) a b

-- | 
--   alongside :: Lens s0 t0 a0 b0 -> Lens s1 t1 a1 b1 -> Lens (s0, s1) (t0, t1) (a0, a1) (b0, b1)
--   
--   
--   
--   alongside :: Getter s0 t0 a0 b0 -> Getter s1 t1 a1 b1 -> Getter (s0, s1) (t0, t1) (a0, a1) (b0, b1)
--   
--   
--   Given two lens/getter families, make a new lens/getter on their
--   product.
alongside :: Functor f => LensLike (AlongsideLeft f b1) s0 t0 a0 b0 -> LensLike (AlongsideRight f t0) s1 t1 a1 b1 -> LensLike f (s0, s1) (t0, t1) (a0, a1) (b0, b1)

-- | 
--   backwards :: Traversal s t a b -> Traversal s t a b
--   backwards :: Fold s t a b -> Fold s t a b
--   
--   
--   Given a traversal or fold, reverse the order that elements are
--   traversed.
--   
--   
--   backwards :: Lens s t a b -> Lens s t a b
--   backwards :: Getter s t a b -> Getter s t a b
--   backwards :: Setter s t a b -> Setter s t a b
--   
--   
--   No effect on lenses, getters or setters.
backwards :: LensLike (Backwards f) s t a b -> LensLike f s t a b

-- | 
--   beside :: Grid s1 t1 a b -> Grid s2 t2 a b -> Grid (s1, s2) (t1, t2) a b
--   
--   
--   Given two grids referencing a type c, create a grid on the
--   pair referencing c.
beside :: (Applicative f, Functor g) => AdapterLike f g s0 t0 a b -> AdapterLike f g s1 t1 a b -> AdapterLike f g (s0, s1) (t0, t1) a b

-- | 
--   beside' :: Grate s0 t0 a b -> Grate s1 t1 a b -> Grate (s0, s1) (t0, t1) a b
--   
--   
--   
--   beside' :: Resetter s0 t0 a b -> Resetter s1 t1 a b -> Resetter (s0, s1) (t0, t1) a b
--   
--   
--   Given two grates/resetters referencing a type c, create a
--   grate/resetter on the pair referencing c.
beside' :: Functor g => GrateLike g s0 t0 a b -> GrateLike g s1 t1 a b -> GrateLike g (s0, s1) (t0, t1) a b

-- | 
--   beside_ :: Traversal s0 t0 a b -> Traversal s1 t1 a b -> Traversal (s0, s1) (t0, t1) a b
--   
--   
--   
--   beside_ :: Fold s0 t0 a b -> Fold s1 t1 a b -> Fold (s0, s1) (t0, t1) a b
--   
--   
--   
--   beside_ :: Setter s0 t0 a b -> Setter s1 t1 a b -> Setter (s0, s1) (t0, t1) a b
--   
--   
--   Given two traversals/folds/setters referencing a type c,
--   create a traversal/fold/setter on the pair referencing c.
beside_ :: Applicative f => LensLike f s0 t0 a b -> LensLike f s1 t1 a b -> LensLike f (s0, s1) (t0, t1) a b

-- | 
--   choosing :: Lens s0 t0 a b -> Lens s1 t1 a b -> Lens (Either s0 s1) (Either t0 t1) a b
--   
--   
--   
--   choosing :: Traversal s0 t0 a b -> Traversal s1 t1 a b -> Traversal (Either s0 s1) (Either t0 t1) a b
--   
--   
--   
--   choosing :: Getter s0 t0 a b -> Getter s1 t1 a b -> Getter (Either s0 s1) (Either t0 t1) a b
--   
--   
--   
--   choosing :: Fold s0 t0 a b -> Fold s1 t1 a b -> Fold (Either s0 s1) (Either t0 t1) a b
--   
--   
--   
--   choosing :: Setter s0 t0 a b -> Setter s1 t1 a b -> Setter (Either s0 s1) (Either t0 t1) a b
--   
--   
--   Given two lens/traversal/getter/fold/setter families with the same
--   substructure, make a new lens/traversal/getter/fold/setter on
--   Either.
choosing :: Functor f => LensLike f s0 t0 a b -> LensLike f s1 t1 a b -> LensLike f (Either s0 s1) (Either t0 t1) a b

-- | 
--   from :: Adapter b a t s -> Adapter s t a b
--   
--   
--   Reverses the direction of an adapter.
--   
--   
--   from :: Getter b a t s -> Reviewer s t a b
--   from :: Reviewer b a t s -> Getter s t a b
--   
--   
--   Changes a Getter into a Reviewer and vice versa.
from :: (Functor f, Functor g) => AdapterLike (FromF (g s -> f t) (f b) g) (FromG (f b) f) b a t s -> AdapterLike f g s t a b
data AlongsideLeft f b a
data AlongsideRight f a b
data FromF i j g x
data FromG e f x
type AdapterLike f g s t a b = (g a -> f b) -> (g s -> f t)
type AdapterLike' f g s a = (g a -> f a) -> (g s -> f s)
type LensLike f s t a b = (a -> f b) -> (s -> f t)
type LensLike' f s a = (a -> f a) -> (s -> f s)
type GrateLike g s t a b = (g a -> b) -> (g s -> t)
type GrateLike' g s a = (g a -> a) -> (g s -> s)
class (Traversable f, Applicative f) => Identical f
data Backwards (f :: k -> Type) (a :: k)
class Bits b => FiniteBits b
instance GHC.Base.Functor f => GHC.Base.Functor (Lens.Family.Stock.FromG e f)
instance Lens.Family.Phantom.Phantom g => Lens.Family.Phantom.Phantom (Lens.Family.Stock.FromG e g)
instance GHC.Base.Functor g => GHC.Base.Functor (Lens.Family.Stock.FromF i j g)
instance Lens.Family.Phantom.Phantom g => Lens.Family.Phantom.Phantom (Lens.Family.Stock.FromF i j g)
instance GHC.Base.Functor f => GHC.Base.Functor (Lens.Family.Stock.AlongsideRight f a)
instance Lens.Family.Phantom.Phantom f => Lens.Family.Phantom.Phantom (Lens.Family.Stock.AlongsideRight f a)
instance GHC.Base.Functor f => GHC.Base.Functor (Lens.Family.Stock.AlongsideLeft f a)
instance Lens.Family.Phantom.Phantom f => Lens.Family.Phantom.Phantom (Lens.Family.Stock.AlongsideLeft f a)

-- | Lenses allow you to use fields of the state of a state monad as if
--   they were variables in an imperative language. use is used to
--   retrieve the value of a variable, and .= and %= allow
--   you to set and modify a variable. C-style compound assignments are
--   also provided.
module Lens.Family.State.Strict

-- | 
--   zoom :: Monad m => Lens' s a -> StateT a m c -> StateT s m c
--   
--   
--   Lift a stateful operation on a field to a stateful operation on the
--   whole state. This is a good way to call a "subroutine" that only needs
--   access to part of the state.
--   
--   
--   zoom :: (Monad m, Monoid c) => Traversal' s a -> StateT a m c -> StateT s m c
--   
--   
--   Run the "subroutine" on each element of the traversal in turn and
--   mconcat all the results together.
--   
--   
--   zoom :: Monad m => Traversal' s a -> StateT a m () -> StateT s m ()
--   
--   
--   Run the "subroutine" on each element the traversal in turn.
zoom :: Monad m => LensLike' (Zooming m c) s a -> StateT a m c -> StateT s m c

-- | 
--   use :: Monad m => Getter s t a b -> StateT s m a
--   
--   
--   Retrieve a field of the state
--   
--   
--   use :: (Monad m, Monoid a) => Fold s t a b -> StateT s m a
--   
--   
--   Retrieve a monoidal summary of all the referenced fields from the
--   state
use :: Monad m => FoldLike a s t a b -> StateT s m a

-- | 
--   uses :: (Monad m, Monoid r) => Fold s t a b -> (a -> r) -> StateT s m r
--   
--   
--   Retrieve all the referenced fields from the state and foldMap the
--   results together with f :: a -> r.
--   
--   
--   uses :: Monad m => Getter s t a b -> (a -> r) -> StateT s m r
--   
--   
--   Retrieve a field of the state and pass it through the function f
--   :: a -> r.
--   
--   
--   uses l f = f <$> use l
--   
uses :: Monad m => FoldLike r s t a b -> (a -> r) -> StateT s m r

-- | Modify a field of the state.
(%=) :: Monad m => ASetter s s a b -> (a -> b) -> StateT s m ()
infix 4 %=

-- | Set a field of the state.
assign :: Monad m => ASetter s s a b -> b -> StateT s m ()

-- | Set a field of the state.
(.=) :: Monad m => ASetter s s a b -> b -> StateT s m ()
infix 4 .=

-- | 
--   (%%=) :: Monad m => Lens s s a b -> (a -> (c, b)) -> StateT s m c
--   
--   
--   Modify a field of the state while returning another value.
--   
--   
--   (%%=) :: (Monad m, Monoid c) => Traversal s s a b -> (a -> (c, b)) -> StateT s m c
--   
--   
--   Modify each field of the state and return the mconcat of the
--   other values.
(%%=) :: Monad m => LensLike (Writer c) s s a b -> (a -> (c, b)) -> StateT s m c
infix 4 %%=

-- | Set a field of the state using the result of executing a stateful
--   command.
(<~) :: Monad m => ASetter s s a b -> StateT s m b -> StateT s m ()
infixr 2 <~
(+=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 +=
(-=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 -=
(*=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 *=
(//=) :: (Monad m, Fractional a) => ASetter' s a -> a -> StateT s m ()
infixr 4 //=
(&&=) :: Monad m => ASetter' s Bool -> Bool -> StateT s m ()
infixr 4 &&=
(||=) :: Monad m => ASetter' s Bool -> Bool -> StateT s m ()
infixr 4 ||=

-- | Monoidally append a value to all referenced fields of the state.
(<>=) :: (Monad m, Monoid a) => ASetter' s a -> a -> StateT s m ()
infixr 4 <>=

-- | Strictly modify a field of the state.
(%!=) :: Monad m => ASetter s s a b -> (a -> b) -> StateT s m ()
infix 4 %!=
(+!=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 +!=
(-!=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 -!=
(*!=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 *!=
(//!=) :: (Monad m, Fractional a) => ASetter' s a -> a -> StateT s m ()
infixr 4 //!=
(&&!=) :: Monad m => ASetter' s Bool -> Bool -> StateT s m ()
infixr 4 &&!=
(||!=) :: Monad m => ASetter' s Bool -> Bool -> StateT s m ()
infixr 4 ||!=
(<>!=) :: (Monad m, Monoid a) => ASetter' s a -> a -> StateT s m ()
infixr 4 <>!=
data Zooming m c a
type LensLike f s t a b = (a -> f b) -> (s -> f t)
type LensLike' f s a = (a -> f a) -> (s -> f s)
type FoldLike r s t a b = LensLike (Constant r) s t a b
data Constant a (b :: k)
type ASetter s t a b = LensLike Identity s t a b
type ASetter' s a = LensLike' Identity s a
data Identity a
data StateT s (m :: Type -> Type) a
type Writer w = WriterT w Identity

-- | Lenses allow you to use fields of the state of a state monad as if
--   they were variables in an imperative language. use is used to
--   retrieve the value of a variable, and .= and %= allow
--   you to set and modify a variable. C-style compound assignments are
--   also provided.
module Lens.Family.State.Lazy

-- | 
--   zoom :: Monad m => Lens' s a -> StateT a m c -> StateT s m c
--   
--   
--   Lift a stateful operation on a field to a stateful operation on the
--   whole state. This is a good way to call a "subroutine" that only needs
--   access to part of the state.
--   
--   
--   zoom :: (Monad m, Monoid c) => Traversal' s a -> StateT a m c -> StateT s m c
--   
--   
--   Run the "subroutine" on each element of the traversal in turn and
--   mconcat all the results together.
--   
--   
--   zoom :: Monad m => Traversal' s a -> StateT a m () -> StateT s m ()
--   
--   
--   Run the "subroutine" on each element the traversal in turn.
zoom :: Monad m => LensLike' (Zooming m c) s a -> StateT a m c -> StateT s m c

-- | 
--   use :: Monad m => Getter s t a b -> StateT s m a
--   
--   
--   Retrieve a field of the state
--   
--   
--   use :: (Monad m, Monoid a) => Fold s t a b -> StateT s m a
--   
--   
--   Retrieve a monoidal summary of all the referenced fields from the
--   state
use :: Monad m => FoldLike a s t a b -> StateT s m a

-- | 
--   uses :: (Monad m, Monoid r) => Fold s t a b -> (a -> r) -> StateT s m r
--   
--   
--   Retrieve all the referenced fields from the state and foldMap the
--   results together with f :: a -> r.
--   
--   
--   uses :: Monad m => Getter s t a b -> (a -> r) -> StateT s m r
--   
--   
--   Retrieve a field of the state and pass it through the function f
--   :: a -> r.
--   
--   
--   uses l f = f <$> use l
--   
uses :: Monad m => FoldLike r s t a b -> (a -> r) -> StateT s m r

-- | Modify a field of the state.
(%=) :: Monad m => ASetter s s a b -> (a -> b) -> StateT s m ()
infix 4 %=

-- | Set a field of the state.
assign :: Monad m => ASetter s s a b -> b -> StateT s m ()

-- | Set a field of the state.
(.=) :: Monad m => ASetter s s a b -> b -> StateT s m ()
infix 4 .=

-- | 
--   (%%=) :: Monad m => Lens s s a b -> (a -> (c, b)) -> StateT s m c
--   
--   
--   Modify a field of the state while returning another value.
--   
--   
--   (%%=) :: (Monad m, Monoid c) => Traversal s s a b -> (a -> (c, b)) -> StateT s m c
--   
--   
--   Modify each field of the state and return the mconcat of the
--   other values.
(%%=) :: Monad m => LensLike (Writer c) s s a b -> (a -> (c, b)) -> StateT s m c
infix 4 %%=

-- | Set a field of the state using the result of executing a stateful
--   command.
(<~) :: Monad m => ASetter s s a b -> StateT s m b -> StateT s m ()
infixr 2 <~
(+=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 +=
(-=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 -=
(*=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 *=
(//=) :: (Monad m, Fractional a) => ASetter' s a -> a -> StateT s m ()
infixr 4 //=
(&&=) :: Monad m => ASetter' s Bool -> Bool -> StateT s m ()
infixr 4 &&=
(||=) :: Monad m => ASetter' s Bool -> Bool -> StateT s m ()
infixr 4 ||=

-- | Monoidally append a value to all referenced fields of the state.
(<>=) :: (Monad m, Monoid a) => ASetter' s a -> a -> StateT s m ()
infixr 4 <>=

-- | Strictly modify a field of the state.
(%!=) :: Monad m => ASetter s s a b -> (a -> b) -> StateT s m ()
infix 4 %!=
(+!=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 +!=
(-!=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 -!=
(*!=) :: (Monad m, Num a) => ASetter' s a -> a -> StateT s m ()
infixr 4 *!=
(//!=) :: (Monad m, Fractional a) => ASetter' s a -> a -> StateT s m ()
infixr 4 //!=
(&&!=) :: Monad m => ASetter' s Bool -> Bool -> StateT s m ()
infixr 4 &&!=
(||!=) :: Monad m => ASetter' s Bool -> Bool -> StateT s m ()
infixr 4 ||!=
(<>!=) :: (Monad m, Monoid a) => ASetter' s a -> a -> StateT s m ()
infixr 4 <>!=
data Zooming m c a
type LensLike f s t a b = (a -> f b) -> (s -> f t)
type LensLike' f s a = (a -> f a) -> (s -> f s)
type FoldLike r s t a b = LensLike (Constant r) s t a b
data Constant a (b :: k)
type ASetter s t a b = LensLike Identity s t a b
type ASetter' s a = LensLike' Identity s a
data Identity a
data StateT s (m :: Type -> Type) a
type Writer w = WriterT w Identity

module Lens.Family.State

-- | This module is provided for "Haskell 2022" compatibility. If you are
--   able to use Rank2Types, I advise you to instead use the rank
--   2 aliases
--   
--   
--   
- Adapter, Adapter'
--   
- Prism, Prism'
--   
- Lens, Lens'
--   
- Traversal, Traversal'
--   
- Setter, Setter'
--   
- Grate, Grate'
--   
- Resetter, Resetter'
--   
- Grid, Grid'
--   
- Fold, Fold'
--   
- Getter, Getter'
--   
- Reviewer, Reviewer'
--   
--   
--   from the lens-family package instead.
--   
--   cloneLens allows one to circumvent the need for rank 2 types by
--   allowing one to take a universal monomorphic lens instance and
--   rederive a polymorphic instance. When you require a lens family
--   parameter you use the type ALens s t a b (or
--   ALens' s a). Then, inside a where clause, you
--   use cloneLens to create a Lens type.
--   
--   For example.
--   
--   
--   example :: ALens s t a b -> Example
--   example l = ... x^.cl ... cl .~ y ...
--    where
--     cl x = cloneLens l x
--   
--   
--   Note: It is important to eta-expand the definition of
--   cl to avoid the dreaded monomorphism restriction.
--   
--   cloneAdapter, cloneGrate, cloneTraversal,
--   cloneSetter, cloneResetter, cloneGetter, and
--   cloneFold provides similar functionality for adapters, grates,
--   traversals, setters, resetters, getters, and folds respectively.
--   Unfortunately, it is not yet known how to clone prisms and grids.
--   
--   Note: Cloning is only need if you use a functional reference
--   multiple times with different instances.
module Lens.Family.Clone

-- | Converts a universal adapter instance back into a polymorphic adapter.
cloneAdapter :: (Functor f, Functor g) => AnAdapter s t a b -> AdapterLike f g s t a b

-- | Converts a universal lens instance back into a polymorphic lens.
cloneLens :: Functor f => ALens s t a b -> LensLike f s t a b

-- | Converts a universal grate instance back into a polymorphic grater.
cloneGrate :: Functor g => AGrate s t a b -> GrateLike g s t a b

-- | Converts a universal traversal instance back into a polymorphic
--   traversal.
cloneTraversal :: Applicative f => ATraversal s t a b -> LensLike f s t a b

-- | Converts a universal setter instance back into a polymorphic setter.
cloneSetter :: Identical f => ASetter s t a b -> LensLike f s t a b

-- | Converts a universal resetter instance back into a polymorphic
--   resetter.
cloneResetter :: Identical f => AResetter s t a b -> GrateLike f s t a b

-- | Converts a universal getter instance back into a polymorphic getter.
cloneGetter :: Phantom f => AGetter s t a b -> LensLike f s t a b

-- | Converts a universal fold instance back into a polymorphic fold.
cloneFold :: (Phantom f, Applicative f) => AFold s t a b -> LensLike f s t a b

-- | AnAdapter s t a b is a universal Adapter s t a b instance
type AnAdapter s t a b = AdapterLike (PStore (s -> a) b) ((->) s) s t a b

-- | AnAdapter' s a is a universal Adapter' s a instance
type AnAdapter' s a = AdapterLike' (PStore (s -> a) a) ((->) s) s a

-- | ALens s t a b is a universal Lens s t a b instance
type ALens s t a b = LensLike (PStore a b) s t a b

-- | ALens' s a is a universal Lens' s a instance
type ALens' s a = LensLike' (PStore a a) s a

-- | ATraversal s t a b is a universal Traversal s t a b instance
type ATraversal s t a b = LensLike (PKleeneStore a b) s t a b

-- | ATraversal' a b is a universal Traversal' a b instance
type ATraversal' s a = LensLike' (PKleeneStore a a) s a

-- | AGetter s t a b is a universal Getter s t a b instance
type AGetter s t a b = FoldLike a s t a b

-- | AGetter' s a is a universal Getter' s a instance
type AGetter' s a = FoldLike' a s a

-- | AFold s t a b is a universal Fold s t a b instance
type AFold s t a b = FoldLike [a] s t a b

-- | AFold' s a is a universal Fold' s a instance
type AFold' s a = FoldLike' [a] s a
data PStore i j a
data PKleeneStore i j a
type LensLike f s t a b = (a -> f b) -> (s -> f t)
type LensLike' f s a = (a -> f a) -> (s -> f s)
type GrateLike g s t a b = (g a -> b) -> (g s -> t)
type GrateLike' g s a = (g a -> a) -> (g s -> s)
type FoldLike r s t a b = LensLike (Constant r) s t a b
type FoldLike' r s a = LensLike' (Constant r) s a
type AGrate s t a b = GrateLike (PCont b a) s t a b
type ASetter s t a b = LensLike Identity s t a b
type AResetter s t a b = GrateLike Identity s t a b
class Functor f => Phantom f
class (Traversable f, Applicative f) => Identical f
instance GHC.Base.Functor (Lens.Family.Clone.PKleeneStore i j)
instance GHC.Base.Applicative (Lens.Family.Clone.PKleeneStore i j)
instance GHC.Base.Functor (Lens.Family.Clone.PStore i j)
