!JlL      !"#$%&'()* + , - . /0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~         !"#$%&'()*+,-./0123456789:;< = > ?!@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi"j"k"l"m"n"o"p"q#r#s#t#u#v#w#x#y#z{|}~$$$$$        %%%%%%%%%%%%%&&'''''((((())**++,,,,,,,,,,,,,,,,,-----------   . . . . ......//////////000 0!0"0#0$0%0&0'0(0)0*0+0,0-0.0/000102030405060708090:0;0<0=0>0?0@0A0B0C0D0E0F0G0H0I0J0K0L0M0N0O0P0Q0R0S0T0U0V0W0X0Y0Z0[0\0]0^0_0`0a0b0c0d0e0f0g0h0i0j0k0l0m0n1o1p1q1r1s1t1u1v1w1x1y1z1{1|1}1~11111112222222222222222222222333333334444444444566666666666666666666666666666666666666667777777777777888888888888899:::                        ;; ;!;";#;$;%;&;';(;);*;+;,;-;.;/;0;1;2;3;456789:;<=>?@ABCDEF<G<H<I<J<K<=None&'/48=>?@ACHPSUVX_k/ optics-core#Class for contravariant bifunctors. optics-core!Class for (covariant) bifunctors.  optics-coreIf p is a L and a * then its left parameter must be phantom.  optics-coreIf p is a L and + then its right parameter must be phantom.    Safe&'-./48=>?@ACHPSUVX_k>  optics-core0Class that is inhabited by all type-level lists xs5, providing the ability to compose a function under  xs. optics-coreCompose a function under  xs. This generalises (M) (aka N for (->)M) to work for curried functions with one argument for each type in the list. optics-core%Append two type-level lists together. optics-coreCurry a type-level list.In pseudo (dependent-)Haskell:  xs y = O (->) y xs  optics-core7This type family should be called with applications of Rep$ on both sides, and will reduce to < if at least one of them is defined; otherwise it is stuck. optics-core(Show a symbol surrounded by quote marks.  optics-core&Show a type surrounded by quote marks.! optics-coreSingleton index list" optics-core An alias for an empty index-list# optics-core/A list of index types, used for indexed optics. !"##"! None&'-./48=>?@ACHPSUVX_kI& optics-coreMapping tag types k to constraints on p.fUsing this type family we define the constraints that the various flavours of optics have to fulfill.' optics-coreTag for a review.( optics-coreTag for a reversed lens.) optics-coreTag for a fold.* optics-coreTag for an affine fold.+ optics-coreTag for a getter., optics-coreTag for a reversed prism.- optics-coreTag for a setter.. optics-coreTag for a traversal./ optics-coreTag for an affine traversal.0 optics-coreTag for a prism.1 optics-coreTag for a lens.2 optics-coreTag for an iso.3 optics-core+Kind for types used as optic tags, such as 1.&'()*+,-./01233210/.-,+*)('&None&'-./48=>?@ACHPSUVX_kU4 optics-core3Computes the least upper bound of two optics kinds.Join k l( represents the least upper bound of an Optic k and an Optic l2. This means in particular that composition of an Optic k and an Optic k will yield an Optic (Join k l).@ optics-core/Subtyping relationship between kinds of optics.An instance of @ k l means that any = k can be used as an = l. For example, we have an @ 1 . instance, but not @ . 1.AThis class needs instances for all possible combinations of tags.A optics-core&Witness of the subtyping relationship.f optics-core*Every kind of optic can be used as itself.g optics-core.Overlappable instance for a custom type error.456789:;<=>?@A@A?>=<;:987654None&',-./48=>?@ACHPSUVX_kIh optics-core;Implements fallback behaviour in case there is no explicit k instance. This has a catch-all incoherent instance that merely yields an error message. However, a downstream module can give a more specific instance that uses Generic% to construct an optic automatically.<To support this, the last parameter will be instantiated to  if at least one of s or t has a Generic instance.i optics-coreIUsed to interpret overloaded label syntax in the absence of an explicit k instance.j optics-core=Type synonym for a type-preserving optic as overloaded label.k optics-core=Support for overloaded labels as optics. An overloaded label #foo5 can be used as an optic if there is an instance of k "foo" k s t a b.See  Optics.Label" for examples and further details.l optics-core@Used to interpret overloaded label syntax. An overloaded label #foo corresponds to l @"foo".P optics-coreP0 is a very simple class which provides a witness Ifoldr f (foldr f init xs) ys = foldr f init (ys ++ xs) where f = (->) It shows that usage of Q in '(%%)' is, in fact, safe.m optics-core0Optic internally as a profunctor transformation.n optics-core.Type representing the various kinds of optics.The tag parameter k# is translated into constraints on p via the type family &.o optics-coreCommon special case of p) where source and target types are equal.Here, we need only one "big" and one "small" type. For lenses, this means that in the restricted form we cannot do type-changing updates.p optics-core/Wrapper newtype for the whole family of optics.The first parameter k, identifies the particular optic kind (e.g. 1 or .).The parameter isC is a list of types available as indices. This will typically be " for unindexed optics, or !i for optics with a single index. See the "Indexed optics" section of the overview documentation in the Optics module of the main optics package for more details.The parameters s and t) represent the "big" structure, whereas a and b! represent the "small" structure.s optics-core0Explicit cast from one optic flavour to another.uThe resulting optic kind is given in the first type argument, so you can use TypeApplications to set it. For example  s @1 o turns o into a %>.EThis is the identity function, modulo some constraint jiggery-pokery.t optics-core*Compose two optics of compatible flavours.Returns an optic of the appropriate supertype. If either or both optics are indexed, the composition preserves all the indices.u optics-core'Compose two optics of the same flavour.Normally you can simply use (t{) instead, but this may be useful to help type inference if the type of one of the optics is otherwise under-constrained.v optics-coreHFlipped function application, specialised to optics and binding tightly.1Useful for post-composing optics transformations:GtoListOf (ifolded %& ifiltered (\i s -> length s <= i)) ["", "a","abc"]["","a"]z optics-core-If no instance matches, GHC tends to bury error messages "No instance for LabelOptic..." within a ton of other error messages about ambiguous type variables and overlapping instances which are irrelevant and confusing. Use incoherent instance providing a custom type error to cut its efforts short.{ optics-core%If no instance matches, fall back on h.| optics-coreIf for an overloaded label #label% there is no instance starting with LabelOptic "label", using it in the context of optics makes GHC immediately pick the overlappable instance defined below (since no other instance could match). If at this point GHC has no information about s or t, it ends up picking incoherent instance of GeneralLabelOptic defined below. Prevent that (if only to be able to inspect most polymorphic types of foo % bar or  view #food in GHCi) by defining a dummy instance that matches all names, thus postponing instance resolution.< !"#&'()*+,-./0123456789:;<=>?@Ahijklmnopqrstuvpqronmstuvkljhit9 u9 v9 None&'-./48=>?@ACHPSUVX_kY optics-coreGenerate sensible error messages in case a user tries to pass either an unindexed optic or indexed optic with unflattened indices where indexed optic with a single index is expected. optics-core^Check whether a list of indices is not empty and generate sensible error message if it's not. optics-coreIShow useful error message when a function expects optics without indices. optics-core2Index a traversal by position of visited elements. optics-coreConstruct a conjoined indexed optic that provides a separate code path when used without indices. Useful for defining indexed optics that are as efficient as their unindexed equivalents when used without indices.Note:  f g is well-defined if and only if f "a ? g. }~ }~None&'/48=>?@ACHPSUVX_k optics-core Used for @ and A. optics-core Used for B and C. optics-coreInternal implementation of D. optics-coreInternal implementation of E. optics-coreInternal implementation of F. optics-core Extract the A element. This will fairly eagerly determine that it can return R' the moment it sees any element at all. optics-core Extract the A element. This will fairly eagerly determine that it can return R' the moment it sees any element at all.  A function considered as an p.None&'/48=>?@ACHPSUVX_k optics-coreType synonym for a getter. optics-core&View the value pointed to by a getter.If you want to W a type-modifying optic that is insufficiently polymorphic to be type-preserving, use -G. optics-core6View the function of the value pointed to by a getter. optics-coreBuild a getter from a function.++ Operators to S the type parameters of p.None&'/48=>?@ACHPSUVX_k optics-coreLift S to the s parameter of an optic. optics-coreLift S to the t parameter of an optic. optics-coreLift S to the a parameter of an optic. optics-coreLift S to the b parameter of an optic.A  H% that applies to at most one element.None&'/48=>?@ACHPSUVX_k  optics-coreBType synonym for a type-preserving van Laarhoven affine traversal. optics-coreAType synonym for a type-modifying van Laarhoven affine traversal.FNote: this isn't exactly van Laarhoven representation as there is no Pointed' class (which would be a superclass of T that contains U but not V<). You can interpret the first argument as a dictionary of Pointed that supplies the point' function (i.e. the implementation of U).A  I has TT available and hence can combine the effects arising from multiple elements using V. In contrast, an  has no way to combine effects from multiple elements, so it must act on at most one element. (It can act on none at all thanks to the availability of point.) optics-core4Type synonym for a type-preserving affine traversal. optics-core3Type synonym for a type-modifying affine traversal. optics-core8Build an affine traversal from a matcher and an updater.If you want to build an - from the van Laarhoven representation, use . optics-core:Work with an affine traversal as a matcher and an updater. optics-core@Build an affine traversal from the van Laarhoven representation.Example::{,azSnd = atraversalVL $ \point f ab@(a, b) -> if a >= 'a' && a <= 'z' then (a, ) <$> f b else point ab:}preview azSnd ('a', "Hi") Just "Hi"preview azSnd ('@', "Hi")Nothing!over azSnd (++ "!!!") ('f', "Hi") ('f',"Hi!!!")set azSnd "Bye" ('Y', "Hi") ('Y',"Hi") optics-coreTraverse over the target of an  and compute a W-based answer. optics-core"Retrieve the value targeted by an V or return the original value while allowing the type to change if it does not match.  J o "a X (Y Z) [ .  o  optics-core?Filter result(s) of a traversal that don't satisfy a predicate.Note: This is not a legal  HM, unless you are very careful not to invalidate the predicate on the target.*As a counter example, consider that given evens =  \ the second  H law is violated: 3K evens ] M LK evens ] ^ 3K evens (] M ]) ,So, in order for this to qualify as a legal  HL you can only use it for actions that preserve the result of the predicate!For a safe variant see M (or  N for read-only optics). / /Optics for working with _.None&'/48=>?@ACHPSUVX_kz optics-coreAn  for working with a ` of a _ value. optics-coreAn  for working with a a of a _ value. A O# that contains at most one element.None&'/48=>?@ACHPSUVX_k  optics-core Type synonym for an affine fold. optics-core Obtain an  by lifting  traverse_ like function.  M  "a [  M  "a [  optics-core"Retrieve the value targeted by an .5let _Right = prism Right $ either (Left . Left) Rightpreview _Right (Right 'x')Just 'x'preview _Right (Left 'y')Nothing optics-core0Retrieve a function of the value targeted by an . optics-coreTraverse over the target of an , computing a W-based answer, but unlike P# do not construct a new structure. optics-core Create an  from a partial function.$preview (afolding listToMaybe) "foo"Just 'f' optics-core:Filter result(s) of a fold that don't satisfy a predicate. optics-coreTry the first -. If it returns no entry, try the second one.?preview (ix 1 % re _Left `afailing` ix 2 % re _Right) [0,1,2,3] Just (Left 1)@preview (ix 42 % re _Left `afailing` ix 2 % re _Right) [0,1,2,3]Just (Right 2) optics-coreCheck to see if this  doesn't match.isn't _Just NothingTrue * *3None&'/48=>?@ACHPSUVX_k optics-coreInternal implementation of 3Q.None&'/48=>?@ACHPSUVX_kG optics-coreInternal implementation of  R.None&'/48=>?@ACHPSUVX_k; optics-core Helper for S* family to visit the first fold only once. optics-core Helper for TB and the like for better efficiency than the foldr-based version.Note that the argument a" of the result should not be used. optics-core$Mark a value for evaluation to whnf.This allows us to, when applying a setter to a structure, evaluate only the parts that we modify. If an optic focuses on multiple targets, Applicative instance of Identity' makes sure that we force evaluation of all of them, but we leave anything else alone. optics-coreWrap the applicative action in - so that we know later that it was executed. optics-coreb7 with no lazy pattern matching for more efficient code.  None&'/48=>?@ACHPSUVX_k  optics-core Class for c4s that have an additional read-only index available. optics-core Class for d4s that have an additional read-only index available. optics-core Class for W4s that have an additional read-only index available. optics-core Traverse  ignoring the results. optics-coreFlipped . optics-coreBList of elements of a structure with an index, from left to right. optics-coreFlipped ! optics-coreThe position in the e is available as the index.2 optics-core3 optics-core4 optics-core5 optics-core6 optics-core7 optics-core None&'/48=>?@ACHPSUVX_k ; optics-coreInternal implementation of  U.;; None&'/48=>?@ACHPSUVX_k< optics-coreInternal implementation of V.= optics-coreInternal implementation of W.> optics-coreInternal implementation of X.<=><=>!None&'/48=>?@ACHPSUVX_ki? optics-coreInternal implementation of Y.??#Extracts elements from a container.None&'/48=>?@ACHPSUVX_k)@ optics-coreType synonym for a fold.A optics-core Obtain a @ by lifting f like function. A M G "a [ G M A "a [ B optics-core-Combine the results of a fold using a monoid.C optics-core!Fold via embedding into a monoid.D optics-coreFold right-associatively.E optics-core&Fold left-associatively, and strictly.F optics-coreFold to a list.GtoListOf (_1 % folded % _Right) ([Right 'h', Left 5, Right 'i'], "bye")"hi"G optics-core&Traverse over all of the targets of a @, computing an T-based answer, but unlike  Z$ do not construct a new structure. G generalizes f to work over any @.+traverseOf_ each putStrLn ("hello","world")helloworld f "a G J H optics-core A version of G with the arguments flipped.I optics-core2Evaluate each action in a structure observed by a @+ from left to right, ignoring the results. g "a I J 4sequenceOf_ each (putStrLn "hello",putStrLn "world")helloworldJ optics-core Fold via the d class.K optics-core Obtain a @( by lifting an operation that returns a d result.+This can be useful to lift operations from  Data.List and elsewhere into a @.!toListOf (folding tail) [1,2,3,4][2,3,4]L optics-core Obtain a @ by lifting O like function.#toListOf (foldring foldr) [1,2,3,4] [1,2,3,4]M optics-coreBuild a @% that unfolds its values from a seed. [\ "a F M M JtoListOf (unfolded $ \b -> if b == 0 then Nothing else Just (b, b - 1)) 10[10,9,8,7,6,5,4,3,2,1]N optics-coreConvert a fold to an 5 that visits the first element of the original fold.For the traversal version see  ].O optics-core.This allows you to traverse the elements of a @ in the opposite order.P optics-coreReturn entries of the first @, then the second one.9toListOf (_1 % ix 0 `summing` _2 % ix 1) ([1,2], [4,7,1])[1,7]Q optics-coreTry the first @/. If it returns no entries, try the second one.$toListOf (ix 1 `failing` ix 0) [4,7][7]"toListOf (ix 1 `failing` ix 0) [4][4]R optics-core5Check to see if this optic matches 1 or more entries.has _Left (Left 12)Truehas _Right (Left 12)FalseThis will always return h for a %> or  ^.has _1 ("hello","world")TrueS optics-coreCheck to see if this @ or  H has no matches.hasn't _Left (Right 12)Truehasn't _Left (Left 12)FalseT optics-coreRetrieve the first entry of a @.headOf folded [1..10]Just 1headOf each (1,2)Just 1U optics-coreRetrieve the last entry of a @.lastOf folded [1..10]Just 10lastOf each (1,2)Just 2V optics-coreReturns h if every target of a @ is h.andOf each (True, False)FalseandOf each (True, True)True i "a V J W optics-coreReturns h if any target of a @ is h.orOf each (True, False)TrueorOf each (False, False)False j "a W J X optics-coreReturns h if any target of a @ satisfies a predicate.anyOf each (=='x') ('x','y')TrueY optics-coreReturns h if every target of a @ satisfies a predicate.allOf each (>=3) (4,5)TrueallOf folded (>=2) [1..10]False k "a Y J Z optics-coreReturns h only if no targets of a @ satisfy a predicate.;noneOf each (not . isn't _Nothing) (Just 3, Just 4, Just 5)True5noneOf (folded % folded) (<10) [[13,99,20],[3,71,42]]False[ optics-coreCalculate the l of every number targeted by a @.productOf each (4,5)20productOf folded [1,2,3,4,5]120 m "a [ J [This operation may be more strict than you would expect. If you want a lazier version use \o -> n M C o l.\ optics-coreCalculate the o of every number targeted by a @.sumOf each (5,6)11sumOf folded [1,2,3,4]10#sumOf (folded % each) [(1,2),(3,4)]10 p "a \ J [This operation may be more strict than you would expect. If you want a lazier version use \o -> q M C o o] optics-core#The sum of a collection of actions.asumOf each ("hello","world") "helloworld",asumOf each (Nothing, Just "hello", Nothing) Just "hello" r "a ] J ^ optics-core#The sum of a collection of actions.msumOf each ("hello","world") "helloworld",msumOf each (Nothing, Just "hello", Nothing) Just "hello" s "a ^ J _ optics-core/Does the element occur anywhere within a given @ of the structure?%elemOf each "hello" ("hello","world")True t "a _ J ` optics-core3Does the element not occur anywhere within a given @ of the structure? notElemOf each 'd' ('a','b','c')True notElemOf each 'a' ('a','b','c')False u "a ` J a optics-core0Calculate the number of targets there are for a @ in a given container.Note:D This can be rather inefficient for large containers and just like v-, this will not terminate for infinite folds. v "a a J lengthOf _1 ("hello",())1lengthOf folded [1..10]10.lengthOf (folded % folded) [[1,2],[3,4],[5,6]]6b optics-core2Obtain the maximum element (if any) targeted by a @ safely.Note: b on a valid _, %> or  ^ will always return R a value.maximumOf folded [1..10]Just 10maximumOf folded []Nothing2maximumOf (folded % filtered even) [1,4,3,6,7,9,2]Just 6 w "a `a (x "empty") M b J cIn the interest of efficiency, This operation has semantics more strict than strictly necessary. \o -> bc . C o bd- has lazier semantics but could leak memory.c optics-core2Obtain the minimum element (if any) targeted by a @ safely.Note: c on a valid _, %> or  ^ will always return R a value.minimumOf folded [1..10]Just 1minimumOf folded []Nothing2minimumOf (folded % filtered even) [1,4,3,6,7,9,2]Just 2 y "a `a (x "empty") M c J cIn the interest of efficiency, This operation has semantics more strict than strictly necessary. \o -> be . C o bf- has lazier semantics but could leak memory.d optics-core2Obtain the maximum element (if any) targeted by a @ according to a user supplied z.CmaximumByOf folded (compare `on` length) ["mustard","relish","ham"]Just "mustard"aIn the interest of efficiency, This operation has semantics more strict than strictly necessary. { cmp "a `a (x "empty") M d J cmp e optics-core2Obtain the minimum element (if any) targeted by a @ according to a user supplied z.aIn the interest of efficiency, This operation has semantics more strict than strictly necessary.CminimumByOf folded (compare `on` length) ["mustard","relish","ham"] Just "ham" | cmp "a `a (x "empty") M e J cmp f optics-coreThe f function takes a @m, a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Z if there is no such element.findOf each even (1,3,4,6)Just 4findOf folded even [1,3,5,7]Nothing } "a f J g optics-coreThe g function takes a @, a monadic predicate and a structure and returns in the monad the leftmost element of the structure matching the predicate, or Z if there is no such element.OfindMOf each (\x -> print ("Checking " ++ show x) >> return (even x)) (1,3,4,6) "Checking 1" "Checking 3" "Checking 4"Just 4OfindMOf each (\x -> print ("Checking " ++ show x) >> return (even x)) (1,3,5,7) "Checking 1" "Checking 3" "Checking 5" "Checking 7"Nothing g JA :: (Monad m, Foldable f) => (a -> m Bool) -> f a -> m (Maybe a) h optics-coreThe h function takes a @, a key, and a structure containing key/value pairs. It returns the first value corresponding to the given key. This function generalizes ~ to work on an arbitrary @ instead of lists.0lookupOf folded 4 [(2, 'a'), (4, 'b'), (4, 'c')]Just 'b'0lookupOf folded 2 [(2, 'a'), (4, 'b'), (4, 'c')]Just 'a'*)@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh*@ABCDEFIGHJKLMRSTUVWYXZ[\]^_`abcdefghNOPQ)P6Q3"An indexed version of an .None&'/48=>?@ACHPSUVX_kPi optics-core(Type synonym for an indexed affine fold.j optics-core Obtain an i by lifting  itraverse_ like function. aifoldVL M m "a [  aitraverseOf_ M j "a [ k optics-core7Retrieve the value along with its index targeted by an i.l optics-core?Retrieve a function of the value and its index targeted by an i.m optics-coreTraverse over the target of an i, computing a W-based answer, but unlike #g# do not construct a new structure.n optics-core Create an i from a partial function.o optics-coreObtain a potentially empty i% by taking the element from another  and using it as an index.p optics-coreTry the first i-. If it returns no entry, try the second one. *ijklmnop inkljmop*p3#An indexed version of an h.None&'/48=>?@ACHPSUVX_k q optics-coreJType synonym for a type-preserving van Laarhoven indexed affine traversal.r optics-coreIType synonym for a type-modifying van Laarhoven indexed affine traversal.FNote: this isn't exactly van Laarhoven representation as there is no Pointed' class (which would be a superclass of T that contains U but not V<). You can interpret the first argument as a dictionary of Pointed that supplies the point' function (i.e. the implementation of U).s optics-core<Type synonym for a type-preserving indexed affine traversal.t optics-core;Type synonym for a type-modifying indexed affine traversal.u optics-core@Build an indexed affine traversal from a matcher and an updater.If you want to build an t- from the van Laarhoven representation, use v.v optics-coreHBuild an indexed affine traversal from the van Laarhoven representation.w optics-coreTraverse over the target of an t and compute a W-based answer.x optics-coreObtain a potentially empty t% by taking the element from another  and using it as an index.- Note: This is not a legal iS, unless you are very careful not to invalidate the predicate on the target (see j for more details).y optics-coreThis is the trivial empty t0, i.e. the optic that targets no substructures.$This is the identity element when a O, , k or "l is viewed as a monoid.6 & ignored %~ absurd6 /qrstuvwxy tsuxy/rqvwAn indexed version of a @.None&'./48=>?@ACHPSUVX_kz optics-core!Type synonym for an indexed fold.{ optics-core"Obtain an indexed fold by lifting  like function. { M  "a [  M { "a [ | optics-core,Fold with index via embedding into a monoid.} optics-core$Fold with index right-associatively.~ optics-core1Fold with index left-associatively, and strictly. optics-coreFold with index to a list.+itoListOf (folded % ifolded) ["abc", "def"]1[(0,'a'),(1,'b'),(2,'c'),(0,'d'),(1,'e'),(2,'f')]Note:5 currently indexed optics can be used as non-indexed.*toListOf (folded % ifolded) ["abc", "def"]"abcdef" optics-core'Traverse over all of the targets of an z, computing an T-based answer, but unlike m# do not construct a new structure.1itraverseOf_ each (curry print) ("hello","world") (0,"hello") (1,"world") optics-core A version of  with the arguments flipped. optics-coreIndexed fold via  class. optics-core Obtain an z) by lifting an operation that returns a  result.+This can be useful to lift operations from  Data.List and elsewhere into an z.(itoListOf (ifolding words) "how are you"[(0,"how"),(1,"are"),(2,"you")] optics-core Obtain an z by lifting  like function.$itoListOf (ifoldring ifoldr) "hello")[(0,'h'),(1,'e'),(2,'l'),(3,'l'),(4,'o')] optics-coreConvert an indexed fold to an i5 that visits the first element of the original fold.For the traversal version see n. optics-coreFilter results of an z that don't satisfy a predicate.-toListOf (ifolded %& ifiltered (>)) [3,2,1,0][1,0] optics-core/This allows you to traverse the elements of an z in the opposite order. optics-coreReturn entries of the first z, then the second one.<itoListOf (ifolded `isumming` ibackwards_ ifolded) ["a","b"]![(0,"a"),(1,"b"),(1,"b"),(0,"a")] optics-coreTry the first z/. If it returns no entries, try the second one.CitoListOf (_1 % ifolded `ifailing` _2 % ifolded) (["a"], ["b","c"]) [(0,"a")]@itoListOf (_1 % ifolded `ifailing` _2 % ifolded) ([], ["b","c"])[(0,"b"),(1,"c")] optics-coreRetrieve the first entry of an z along with its index.iheadOf ifolded [1..10] Just (0,1) optics-coreRetrieve the last entry of an z along with its index.ilastOf ifolded [1..10] Just (9,10) optics-core4Return whether or not any element viewed through an z, satisfies a predicate, with access to the i.-When you don't need access to the index then X& is more flexible in what it accepts. X o "a  o M Y  optics-core5Return whether or not all elements viewed through an z* satisfy a predicate, with access to the i.-When you don't need access to the index then Y& is more flexible in what it accepts. Y o "a  o M Y  optics-core=Return whether or not none of the elements viewed through an z* satisfy a predicate, with access to the i.-When you don't need access to the index then Z& is more flexible in what it accepts. Z o "a  o M Y  optics-coreThe  function takes an z, a predicate that is also supplied the index, a structure and returns the left-most element of the structure along with its index matching the predicate, or Z if there is no such element.-When you don't need access to the index then f& is more flexible in what it accepts. optics-coreThe  function takes an z, a monadic predicate that is also supplied the index, a structure and returns in the monad the left-most element of the structure matching the predicate, or Z if there is no such element.-When you don't need access to the index then g& is more flexible in what it accepts.)z{|}~z{|}~)63$An indexed version of a  ^.None&'/48=>?@ACHPSUVX_k optics-core#Type synonym for an indexed getter. optics-core(Build an indexed getter from a function.iview (ito id) ('i', 'x') ('i','x') optics-corePUse a value itself as its own index. This is essentially an indexed version of o. optics-core/View the value pointed to by an indexed getter. optics-core?View the function of the value pointed to by an indexed getter.++An indexed version of a %>.None&'/48=>?@ACHPSUVX_k  optics-core>Type synonym for a type-preserving van Laarhoven indexed lens. optics-core=Type synonym for a type-modifying van Laarhoven indexed lens. optics-core0Type synonym for a type-preserving indexed lens. optics-core/Type synonym for a type-modifying indexed lens. optics-core1Build an indexed lens from a getter and a setter.If you want to build an - from the van Laarhoven representation, use . optics-core<Build an indexed lens from the van Laarhoven representation. optics-core<Convert an indexed lens to its van Laarhoven representation. optics-core>Work with an indexed lens in the van Laarhoven representation. optics-core0There is an indexed field for every type in the .set (mapped % devoid) 1 [][]!over (_Just % devoid) abs NothingNothing 1 1 An indexed version of a 3p.None&'./48=>?@ACHPSUVX_k optics-core2Type synonym for a type-preserving indexed setter. optics-core1Type synonym for a type-modifying indexed setter. optics-core&Apply an indexed setter as a modifier. optics-core0Apply an indexed setter as a modifier, strictly. optics-coreApply an indexed setter.  o f "a  o (i _ -> f i)  optics-core"Apply an indexed setter, strictly. optics-coreABuild an indexed setter from a function to modify the element(s). optics-coreIndexed setter via the  class.   "a  - -Overloaded labels as opticsNone&'/48=>?@ACHPSUVX_kjklklj%#A generalised or first-class field.None&'/48=>?@ACHPSUVX_ks  optics-core6Type synonym for a type-preserving van Laarhoven lens. optics-core5Type synonym for a type-modifying van Laarhoven lens. optics-core(Type synonym for a type-preserving lens. optics-core'Type synonym for a type-modifying lens. optics-coreVBuild a lens from a getter and a setter, which must respect the well-formedness laws.If you want to build a - from the van Laarhoven representation, use . optics-core*Work with a lens as a getter and a setter.  ( f g) k "a k f g  optics-core3Build a lens from the van Laarhoven representation. optics-core3Convert a lens to the van Laarhoven representation. optics-core5Work with a lens in the van Laarhoven representation. optics-coreStrict version of o.`Useful for strictifying optics with lazy (irrefutable) pattern matching by precomposition, e.g. 0q =  % 0r  optics-coreFocus on both sides of an . optics-coreMake a R from two other lenses by executing them on their respective halves of a product.0(Left 'a', Right 'b') ^. alongside chosen chosen ('a','b')<(Left 'a', Right 'b') & alongside chosen chosen .~ ('c','d')(Left 'c',Right 'd') optics-coreWe can always retrieve a () from any type.view united "hello"()set united () "hello""hello"11&Optics for working with s.None&'/48=>?@ACHPSUVX_k optics-coreA  that focuses on the root of a .view root $ Node 42 []42 optics-coreA 3 returning the direct descendants of the root of a   s  "a +Common abstraction for all kinds of optics.None&'/48=>?@ACHPSUVX_ku!"#34@opstuv3pos@4tuv#"!'Optics for working with tus.None&'/48=>?@ACHPSUVX_k8 optics-coreConstruct a map from an z.%The construction is left-biased (see T), i.e. the first occurrences of keys in the fold or traversal order are preferred."toMapOf ifolded ["hello", "world"]"fromList [(0,"hello"),(1,"world")]8toMapOf (folded % ifolded) [('a',"alpha"),('b', "beta")]%fromList [('a',"alpha"),('b',"beta")],toMapOf (ifolded <%> ifolded) ["foo", "bar"]RfromList [((0,0),'f'),((0,1),'o'),((0,2),'o'),((1,0),'b'),((1,1),'a'),((1,2),'r')]KtoMapOf (folded % ifolded) [('a', "hello"), ('b', "world"), ('a', "dummy")]&fromList [('a',"hello"),('b',"world")] optics-coreQFocus on the largest key smaller than the given one and its corresponding value.CMap.fromList [('a', "hi"), ('b', "there")] & over (lt 'b') (++ "!")$fromList [('a',"hi!"),('b',"there")]9ipreview (lt 'a') $ Map.fromList [('a', 'x'), ('b', 'y')]Nothing optics-coreRFocus on the smallest key greater than the given one and its corresponding value.CMap.fromList [('a', "hi"), ('b', "there")] & over (gt 'b') (++ "!")#fromList [('a',"hi"),('b',"there")]9ipreview (gt 'a') $ Map.fromList [('a', 'x'), ('b', 'y')]Just ('b','y') optics-coreZFocus on the largest key smaller or equal than the given one and its corresponding value.CMap.fromList [('a', "hi"), ('b', "there")] & over (le 'b') (++ "!")$fromList [('a',"hi"),('b',"there!")]9ipreview (le 'a') $ Map.fromList [('a', 'x'), ('b', 'y')]Just ('a','x') optics-core[Focus on the smallest key greater or equal than the given one and its corresponding value.CMap.fromList [('a', "hi"), ('c', "there")] & over (ge 'b') (++ "!")$fromList [('a',"hi"),('c',"there!")]9ipreview (ge 'b') $ Map.fromList [('a', 'x'), ('c', 'y')]Just ('c','y')(None&'/48=>?@ACHPSUVX_kR optics-coreConstruct a map from an z.%The construction is left-biased (see T), i.e. the first occurrences of keys in the fold or traversal order are preferred."toMapOf ifolded ["hello", "world"]"fromList [(0,"hello"),(1,"world")]4toMapOf (folded % ifolded) [(1,"alpha"),(2, "beta")]!fromList [(1,"alpha"),(2,"beta")]FtoMapOf (icompose (\a b -> 10*a+b) $ ifolded % ifolded) ["foo", "bar"]=fromList [(0,'f'),(1,'o'),(2,'o'),(10,'b'),(11,'a'),(12,'r')]EtoMapOf (folded % ifolded) [(1, "hello"), (2, "world"), (1, "dummy")]"fromList [(1,"hello"),(2,"world")] optics-coreQFocus on the largest key smaller than the given one and its corresponding value.@IntMap.fromList [(1, "hi"), (2, "there")] & over (lt 2) (++ "!") fromList [(1,"hi!"),(2,"there")]6ipreview (lt 1) $ IntMap.fromList [(1, 'x'), (2, 'y')]Nothing optics-coreRFocus on the smallest key greater than the given one and its corresponding value.@IntMap.fromList [(1, "hi"), (2, "there")] & over (gt 2) (++ "!")fromList [(1,"hi"),(2,"there")]6ipreview (gt 1) $ IntMap.fromList [(1, 'x'), (2, 'y')] Just (2,'y') optics-coreZFocus on the largest key smaller or equal than the given one and its corresponding value.@IntMap.fromList [(1, "hi"), (2, "there")] & over (le 2) (++ "!") fromList [(1,"hi"),(2,"there!")]6ipreview (le 1) $ IntMap.fromList [(1, 'x'), (2, 'y')] Just (1,'x') optics-core[Focus on the smallest key greater or equal than the given one and its corresponding value.@IntMap.fromList [(1, "hi"), (3, "there")] & over (ge 2) (++ "!") fromList [(1,"hi"),(3,"there!")]6ipreview (ge 2) $ IntMap.fromList [(1, 'x'), (3, 'y')] Just (3,'y'))A generalised or first-class constructor.None&'/48=>?@ACHPSUVX_kl  optics-core)Type synonym for a type-preserving prism. optics-core(Type synonym for a type-modifying prism. optics-core]Build a prism from a constructor and a matcher, which must respect the well-formedness laws.If you want to build a - from the van Laarhoven representation, use prismVL from the  optics-vl package. optics-core This is usually used to build a *, when you have to use an operation like vw which already returns a . optics-core Work with a  as a constructor and a matcher. optics-coreUse a " to work over part of a structure. optics-core%Given a pair of prisms, project sums. Viewing a  as a co-%>-, this combinator can be seen to be dual to %x. optics-coreLift a  through a c functor, giving a C that matches only if all the elements of the container match the . optics-coreThis 0 compares for exact equality with a given value. only 4 # ()4 5 ^? only 4Nothing optics-coreThis  compares for approximate equality with a given value and a predicate for testing, an example where the value is the empty list and the predicate checks that a list is empty (same as yz with the y{ list instance):nearly [] null # ()[][1,2,3,4] ^? nearly [] nullNothing  []  ::  [a] ()To comply with the " laws the arguments you supply to  nearly a p are somewhat constrained. We assume p x holds iff x "a a.. Under that assumption then this is a valid .This is useful when working with a type where you can test equality for only a subset of its values, and the prism selects such a value. 0 0) s for the  datatype.None&'/48=>?@ACHPSUVX_kp^ optics-coreA  that matches on the Z constructor of . optics-coreA  that matches on the R constructor of .*,Traversals for manipulating parts of a list.None&'/48=>?@ACHPSUVX_ky  optics-coreA 0 stripping a prefix from a list when used as a  H/, or prepending that prefix when run backwards:"preview" ^? prefixed "pre" Just "view""review" ^? prefixed "pre"Nothingprefixed "pre" # "amble" "preamble" optics-coreA 0 stripping a suffix from a list when used as a  H., or appending that suffix when run backwards:"review" ^? suffixed "view" Just "re""review" ^? suffixed "tire"Nothingsuffixed ".o" # "hello" "hello.o"+ s for the  datatype.None&'/48=>?@ACHPSUVX_k|M optics-coreA  that matches on the  constructor of . optics-coreA  that matches on the  constructor of .,The , operator allows some optics to be reversed.None&'./48=>?@ACHPSUVX_kL optics-coreHelper for reversing optics. optics-coreClass for optics that can be versed. optics-coreMInjective type family that maps an optic kind to the optic kind produced by  versing it.  2 = 2  0 = ,  , = 0  1 = (  ( = 1  + = '  ' = +  optics-core Reverses optics, turning around _ into _, | into  } (and back), %> into ~ (and back) and  ^ into  (and back). optics-coreInternal implementation of re.-?Converting read-write optics into their read-only counterparts.None&'/48=>?@ACHPSUVX_k. optics-coreCClass for read-write optics that have their read-only counterparts. optics-coreXTurn read-write optic into its read-only counterpart (or leave read-only optics as-is). This is useful when you have an  optic :: p k is s t a b of read-write kind k such that s, t, a, b' are rigid, there is no evidence that s ~ t and a ~ b and you want to pass optic< to one of the functions that accept read-only optic kinds.Example:9let fstIntToChar = _1 :: Lens (Int, r) (Char, r) Int Char:t view fstIntToChar...(...Couldn't match type Char  with Int ...:t view (getting fstIntToChar).view (getting fstIntToChar) :: (Int, r) -> Int optics-coreInternal implementation of . A backwards %>.None&'/48=>?@ACHPSUVX_k` optics-core1Type synonym for a type-preserving reversed lens. optics-core0Type synonym for a type-modifying reversed lens.((  A backwards |.None&'/48=>?@ACHPSUVX_k optics-core2Type synonym for a type-preserving reversed prism. optics-core1Type synonym for a type-modifying reversed prism.,, A backwards  ^, i.e. a function.None&'/48=>?@ACHPSUVX_k optics-coreType synonym for a review. optics-core!Retrieve the value targeted by a .review _Left "hi" Left "hi" optics-coreAn analogue of   for reviews.''1Translates between types with the same structure.None&'/48=>?@ACHPSUVX_k߾ optics-core-This class provides for symmetric bifunctors. optics-core  M  "a [  f M  =  M  f  g M  =  M  g  f g M  =  M  g f view swapped (1,2)(2,1) optics-core'Type synonym for a type-preserving iso. optics-core&Type synonym for a type-modifying iso. optics-core.Build an iso from a pair of inverse functions.If you want to build an - from the van Laarhoven representation, use isoVL from the  optics-vl package. optics-core-Extract the two components of an isomorphism. optics-core Based on ala& from Conor McBride's work on Epigram.*This version is generalized to accept any  , not just a newtype.$au (coerced1 @Sum) foldMap [1,2,3,4]10PYou may want to think of this combinator as having the following, simpler type: au :: + s t a b -> ((b -> t) -> e -> s) -> e -> a  optics-coreThe opposite of working 3K a 3p is working  an isomorphism.  "a 3K M ,  optics-core+Capture type constraints as an isomorphism.Note: This is the identity optic::t view equalityview equality :: a -> a optics-coreProof of reflexivity. optics-core<Data types that are representationally equal are isomorphic.!view coerced 'x' :: Identity Char Identity 'x' optics-coreType-preserving version of 7 with type parameters rearranged for TypeApplications.'newtype MkInt = MkInt Int deriving Show$over (coercedTo @Int) (*3) (MkInt 2)MkInt 6 optics-coreSpecial case of  for trivial newtype wrappers.5over (coerced1 @Identity) (++ "bar") (Identity "foo")Identity "foobar" optics-coreIf v is an element of a type a, and a' is a sans the element v, then  v is an isomorphism from  a' to a.  "a  M  OKeep in mind this is only a real isomorphism if you treat the domain as being  (a sans v).9This is practically quite useful when you want to have a tu4 where all the entries should have non-zero values.7Map.fromList [("hello",1)] & at "hello" % non 0 %~ (+2)fromList [("hello",3)]?Map.fromList [("hello",1)] & at "hello" % non 0 %~ (subtract 1) fromList []0Map.fromList [("hello",1)] ^. at "hello" % non 01%Map.fromList [] ^. at "hello" % non 00JThis combinator is also particularly useful when working with nested maps.e.g.$ When you want to create the nested tu when it is missing:<Map.empty & at "hello" % non Map.empty % at "world" ?~ "!!!"/fromList [("hello",fromList [("world","!!!")])]6and when have deleting the last entry from the nested tu@ mean that we should delete its entry from the surrounding one:mMap.fromList [("hello", Map.fromList [("world","!!!")])] & at "hello" % non Map.empty % at "world" .~ Nothing fromList []8It can also be used in reverse to exclude a given value:non 0 # rem 10 4Just 2non 0 # rem 10 5Nothing optics-core p generalizes  (p # ()) to take any unit /This function generates an isomorphism between  (a |  p a) and a.PMap.singleton "hello" Map.empty & at "hello" % non' _Empty % at "world" ?~ "!!!"/fromList [("hello",fromList [("world","!!!")])]kMap.fromList [("hello", Map.fromList [("world","!!!")])] & at "hello" % non' _Empty % at "world" .~ Nothing fromList [] optics-core a p generalizes  a# to take any value and a predicate.  a "a  M  a This function assumes that p a holds h' and generates an isomorphism between  (a |  (p a)) and a.FMap.empty & at "hello" % anon Map.empty Map.null % at "world" ?~ "!!!"/fromList [("hello",fromList [("world","!!!")])]wMap.fromList [("hello", Map.fromList [("world","!!!")])] & at "hello" % anon Map.empty Map.null % at "world" .~ Nothing fromList [] optics-coreAThe canonical isomorphism for currying and uncurrying a function.  =   b view curried fst 3 43 optics-coreAThe canonical isomorphism for uncurrying and currying a function.  =  b    = ,  (view uncurried (+)) (1,2)3 optics-core(The isomorphism for flipping a function.(view flipped (,)) 1 2(2,1) optics-core<Given a function that is its own inverse, this gives you an  using it in both directions.  "a   "live" ^. involuted reverse"evil"$"live" & involuted reverse %~ ('d':)"lived"22.Lifting optics using Ws .None&'./48=>?@ACHPSUVX_k  optics-coreClass for optics supporting   through a W.  optics-core>Type family that maps an optic to the optic kind produced by   using it.  optics-coreThe  % can be used to lift optic through a W.   ::  s t a b ->  (f s) (g t) (f a) (g b)   :: %> s a ->  (f s) (f a)   ::  s a ->  (f s) (f a)   :: | t b ->  (g t) (g b)   ::  t b ->  (g t) (g b)  optics-core,[('a', True), ('b', False)] ^. _1 %& mapping"ab"Slet v = [[ (('a', True), "foo"), (('b', False), "bar")], [ (('c', True), "xyz") ] ]"v ^. _1 % _2 %& mapping %& mapping[[True,False],[True]]      /Optics for types defined in  GHC.Generics.None&'-/48=>?@ACHPSUVX_k optics-core:Convert from the data type to its representation (or back)-view (generic % re generic) "hello" :: String"hello" optics-core:Convert from the data type to its representation (or back)  0es for tuple types.None&'/48=>?@ACHPSUVX_k  optics-core,Provides access to the 9th field of a tuple. optics-core Access the 9th field of a tuple. optics-core+Provide access to the 8th field of a tuple.  optics-core Access the 8th field of a tuple.! optics-core+Provide access to the 7th field of a tuple." optics-core Access the 7th field of a tuple.# optics-core.Provides access to the 6th element of a tuple.$ optics-core Access the 6th field of a tuple.% optics-core,Provides access to the 5th field of a tuple.& optics-core Access the 5th field of a tuple.' optics-core+Provide access to the 4th field of a tuple.( optics-core Access the 4th field of a tuple.) optics-core,Provides access to the 3rd field of a tuple.* optics-core Access the 3rd field of a tuple.+ optics-core,Provides access to the 2nd field of a tuple., optics-core Access the 2nd field of a tuple._2 .~ "hello" $ (1,(),3,4)(1,"hello",3,4)(1,2,3,4) & _2 %~ (*3) (1,6,3,4)traverseOf _2 print (1,2)2(1,())- optics-core(Provides access to 1st field of a tuple.. optics-core?Access the 1st field of a tuple (and possibly change its type). (1,2) ^. _11(1,2) & _1 .~ "hello" ("hello",2)(traverseOf _1 putStrLn ("hello","world")hello ((),"world")/This can also be used on larger tuples as well:(1,2,3,4,5) & _1 %~ (+41) (42,2,3,4,5)/ optics-coreStrict version of .0 optics-coreStrict version of ,1 optics-coreStrict version of *2 optics-coreStrict version of (3 optics-coreStrict version of &4 optics-coreStrict version of $5 optics-coreStrict version of "6 optics-coreStrict version of  7 optics-coreStrict version of  !"#$%&'()*+,-./01234567-.+,)*'(%&#$!" /012345671A  for a type that may be o.None%&'/48=>?@ACHPSUVX_gk:n optics-coreClass for types that may be o.o optics-coreisn't _Empty [1,2,3]Truep optics-core1Pattern synonym for matching on any type with an n instance.-case Nothing of { Empty -> True; _ -> False }Truenopnop2:Optics to access the left or right element of a container.None%&'/48=>?@ACHPSUVX_gk<; optics-corenThis class provides a way to attach or detach elements on the right side of a structure in a flexible manner. optics-coremThis class provides a way to attach or detach elements on the left side of a structure in a flexible manner. optics-core  ::  [a] [b] (a, [a]) (b, [b])  ::  (e a) (e b) (a, e a) (b, e b)  :: 3 (Vector a) (Vector b) (a, Vector a) (b, Vector b)  ::   (, )  ::  Text (, Text)  ::  ByteString (, ByteString)  optics-coreEPattern synonym for matching on the rightmost element of a structure.#case ['a','b','c'] of (_ :> x) -> x'c' optics-coreDPattern synonym for matching on the leftmost element of a structure.#case ['a','b','c'] of (x :< _) -> x'a' optics-core an element onto a container.This is an infix alias for .1 <| [][1] 'a' <| "bc""abc"1 <| [][1] 1 <| [2, 3][1,2,3] optics-core an element onto a container. cons 'a' """a" cons 'a' "bc""abc" optics-corepAttempt to extract the left-most element from a container, and a version of the container without that element. uncons []Nothinguncons [1, 2, 3]Just (1,[2,3]) optics-coreAn  reading and writing to the  of a  non-empty container."abc" ^? _headJust 'a'"abc" & _head .~ 'd'"dbc"[1,2,3] & _head %~ (*10)[10,2,3][] & _head %~ absurd[][1,2,3] ^? _headJust 1 [] ^? _headNothing[1,2] ^? _headJust 1[] & _head .~ 1[][0] & _head .~ 2[2][0,1] & _head .~ 2[2,1] optics-coreAn  reading and writing to the  of a  non-empty container."ab" & _tail .~ "cde""acde"[] & _tail .~ [1,2][]([1,2,3,4,5] & _tail % traversed %~ (*10)[1,20,30,40,50][1,2] & _tail .~ [3,4,5] [1,3,4,5][] & _tail .~ [1,2][]"abc" ^? _tail Just "bc""hello" ^? _tail Just "ello" "" ^? _tailNothing optics-coreAn 8 reading and replacing all but the a last element of a  non-empty container."abcd" ^? _init Just "abc" "" ^? _initNothing"ab" & _init .~ "cde""cdeb"[] & _init .~ [1,2][]&[1,2,3,4] & _init % traversed %~ (*10) [10,20,30,4][1,2,3] ^? _init Just [1,2]"hello" ^? _init Just "hell" [] ^? _initNothing optics-coreAn / reading and writing to the last element of a  non-empty container."abc" ^? _lastJust 'c' "" ^? _lastNothing[1,2,3] & _last %~ (+1)[1,2,4][1,2] ^? _lastJust 2[] & _last .~ 1[][0] & _last .~ 2[2][0,1] & _last .~ 2[0,2] optics-core( an element onto the end of a container.This is an infix alias for . "" |> 'a'"a" "bc" |> 'a'"bca" optics-core( an element onto the end of a container.snoc "hello" '!'"hello!" optics-coreqAttempt to extract the right-most element from a container, and a version of the container without that element.unsnoc "hello!"Just ("hello",'!') unsnoc ""Nothing5555553*Applies an update to all contained values.None&'/48=>?@ACHPSUVX_kM optics-core*Type synonym for a type-preserving setter. optics-core)Type synonym for a type-modifying setter. optics-coreApply a setter as a modifier. optics-core'Apply a setter as a modifier, strictly.2TODO DOC: what exactly is the strictness property?Example: H f :: Int -> (Int, a) -> (Int, a) f k acc | k > 0 = f (k - 1) $  0r (+1) acc | otherwise = acc Fruns in constant space, but would result in a space leak if used with .Note that replacing  with  or 0r with 0q5 (which amount to the same thing) doesn't help when A is used, because the first coordinate of a pair is never forced. optics-coreApply a setter.  o v "a  o (Y v) set _1 'x' ('y', 'z') ('x','z') optics-coreApply a setter, strictly.2TODO DOC: what exactly is the strictness property? optics-corefBuild a setter from a function to modify the element(s), which must respect the well-formedness laws. optics-core Create a  for a W.   "a N - -4*Definitions of infix operators for optics.None&'/48=>?@ACHPSUVX_kW  optics-coreFlipped infix version of . optics-coreFlipped infix version of . optics-coreFlipped infix version of F. optics-coreInfix version of . optics-coreInfix version of . optics-coreInfix version of . optics-coreInfix version of . optics-coreInfix version of . optics-coreSet the target of a  to R a value. o  b "a  o (R b) Nothing & equality ?~ 'x'Just 'x'Map.empty & at 3 ?~ 'x'fromList [(3,'x')] optics-coreStrict version of ().   888844444451Definitions of unsafe infix operators for optics.None&'/48=>?@ACHPSUVX_k\ optics-corePerform an *UNSAFE* - of an affine fold assuming that it is there.Left 4 ^?! _Left4"world" ^?! ix 3'l' [] ^?! _head'*** Exception: (^?!): empty affine fold...86 Optics for  and -like containers.None&'-./48=>?@ACHPSUVX_k optics-core provides a Q that can be used to read, write or delete the value associated with a key in a #-like container on an ad hoc basis.An instance of  should satisfy:  k "a  k t   optics-core"Map.fromList [(1,"world")] ^. at 1 Just "world"at 1 ?~ "hello" $ Map.emptyfromList [(1,"hello")]Note:s Usage of this function might introduce space leaks if you're not careful to make sure that values put inside the RK constructor are evaluated. To force the values and avoid such leaks, use  instead.Note: 6-like containers form a reasonable instance, but not )-like ones, where you cannot satisfy the  laws. optics-coreProvides a simple 2 lets you traverse the value at a given key in a 0 or element at an ordinal position in a list or e. optics-core}Type family that takes a key-value container type and returns the kind of optic to index into it. For most containers, it's /,  Representable (Naperian) containers it is 1, and multi-maps would have  A_Traversal. optics-coreNB: Setting the value of this  will only set the value in  if it is already present.!If you want to be able to insert missing values, you want .[1,2,3,4] & ix 2 %~ (*10) [1,2,30,4]"abcd" & ix 2 .~ 'e'"abed""abcd" ^? ix 2Just 'c' [] ^? ix 2Nothing optics-corewType family that takes a key-value container type and returns the type of values stored in the container, for example  ( k a) ~ a. This is shared by both  and . optics-coreThis class provides a simple ` that lets you view (and modify) information about whether or not a container contains a given . Instances are provided for -like containers only. optics-core'IntSet.fromList [1,2,3,4] ^. contains 3True'IntSet.fromList [1,2,3,4] ^. contains 5False/IntSet.fromList [1,2,3,4] & contains 3 .~ FalsefromList [1,2,4] optics-corezType family that takes a key-value container type and returns the type of keys (indices) into the container, for example  ( k a) ~ k. This is shared by ,  and . optics-coreA definition of  for types with an F instance. This is the default if you don't specify a definition for . optics-core Version of  strict in the value inside the R constructor.Example:1(at () .~ Just (error "oops") $ Nothing) `seq` ()()2(at' () .~ Just (error "oops") $ Nothing) `seq` ()*** Exception: oops...+view (at ()) (Just $ error "oops") `seq` ()(),view (at' ()) (Just $ error "oops") `seq` ()*** Exception: oops...4It also works as expected for other data structures:2(at 1 .~ Just (error "oops") $ Map.empty) `seq` ()()3(at' 1 .~ Just (error "oops") $ Map.empty) `seq` ()*** Exception: oops... optics-core,Delete the value associated with a key in a -like container  k =  k 4 Nothing  optics-core  ::  ->  (a, a, a, a, a, a, a, a, a) a optics-core  ::  ->  (a, a, a, a, a, a, a, a) a optics-core  ::  ->  (a, a, a, a, a, a, a) a optics-core  ::  ->  (a, a, a, a, a, a) a optics-core  ::  ->  (a, a, a, a, a) a optics-core  ::  ->  (a, a, a, a) a optics-core  ::  ->  (a, a, a) a optics-core  ::  ->  (a, a) a optics-core arr  i "a arr 4  i arr  [(i,e)] "a  i 4 e  arr  optics-core arr  i "a arr 4  i arr  [(i,e)] "a  i 4 e  arr  7$Turn optics into arrow transformers.None&'/48=>?@ACHPSUVX_kr optics-core(Turn an optic into an arrow transformer. optics-coreZRun an arrow command and use the output to set all the targets of an optic to the result. QrunKleisli action ((), (), ()) where action = assignA _1 (Kleisli (const getVal1)) >>> assignA _2 (Kleisli (const getVal2)) >>> assignA _3 (Kleisli (const getVal3)) getVal1 :: Either String Int getVal1 = ... getVal2 :: Either String Bool getVal2 = ... getVal3 :: Either String Char getVal3 = ...  has the type   (, , ) optics-core!Internal implementation of overA.8&Optics for working with numeric types.None%&'/48=>?@ACHPSUVX_gk\ optics-coreFPattern synonym that can be used to construct or pattern match on an  as if it were of any  type. optics-coreThis * can be used to model the fact that every  type is a subset of .Embedding through the  only succeeds if the 2 would pass through unmodified when re-extracted. optics-core?A prism that shows and reads integers in base-2 through base-36LNote: This is an improper prism, since leading 0s are stripped when reading."100" ^? base 16Just 256 1767707668033969 ^. re (base 36) "helloworld" optics-coreLike , but handles up to base-36 optics-coreLike , but handles up to base-36 optics-coreA safe variant of  optics-core+Select digits that fall into the given base optics-coreA simpler variant of > that only prepends a dash and doesn't know about parentheses optics-coreA simpler variant of \ that supports any base, only recognizes an initial dash and doesn't know about parentheses optics-core  =  2 optics-core  =  8 optics-core  =  10 optics-core  =  16 optics-core  n =  (+n) (subtract n)"[1..3] ^.. traversed % adding 1000[1001,1002,1003] optics-core  n =  (subtract n) ((+n)  n = , ( n)  optics-core  n = iso (*n) (/n)Note: This errors for n = 05 & multiplying 1000 %~ (+3)5.003Flet fahrenheit = multiplying (9/5) % adding 32 in 230 ^. re fahrenheit110.0 optics-core   n =  (/n) (*n)  n = , ( n)Note: This errors for n = 0 optics-core  n =  (**n) (**recip n)Note: This errors for n = 0Fau (coerced1 @Sum % re (exponentiating 2)) (foldMapOf each) (3,4) == 5True optics-core  =   8au (coerced1 @Sum % negated) (foldMapOf each) (3,4) == 7True;au (coerced1 @Sum) (foldMapOf (each % negated)) (3,4) == -7True  9Optics for working with s.None&'/48=>?@ACHPSUVX_k6 optics-coreThis % can be used to change the type of a ( by mapping the elements to new values. Sadly, you can't create a valid  H for a ., but you can manipulate it by reading using J and reindexing it via .(over setmapped (+1) (fromList [1,2,3,4])fromList [2,3,4,5] optics-coreConstruct a set from a fold.setOf folded ["hello","world"]fromList ["hello","world"]7setOf (folded % _2) [("hello",1),("world",2),("!!!",3)]fromList [1,2,3]:Optics for working with s.None&'/48=>?@ACHPSUVX_k̗ optics-core IntSet isn't Foldable, but this @* can be used to access the members of an .&sumOf members $ setOf folded [1,2,3,4]10 optics-coreThis % can be used to change the type of a ( by mapping the elements to new values. Sadly, you can't create a valid  H for an ., but you can manipulate it by reading using J and reindexing it via .(over setmapped (+1) (fromList [1,2,3,4])fromList [2,3,4,5] optics-core Construct an  from a fold.setOf folded [1,2,3,4]fromList [1,2,3,4]7setOf (folded % _2) [("hello",1),("world",2),("!!!",3)]fromList [1,2,3] >Lifts an effectful operation on elements to act on structures.None&'/48=>?@ACHPSUVX_kU optics-core;Type synonym for a type-preserving van Laarhoven traversal. optics-core:Type synonym for a type-modifying van Laarhoven traversal. optics-core-Type synonym for a type-preserving traversal. optics-core,Type synonym for a type-modifying traversal. optics-core8Build a traversal from the van Laarhoven representation.  M  "a [  M  "a [  optics-core.Map each element of a structure targeted by a F, evaluate these actions from left to right, and collect the results. optics-core A version of  with the arguments flipped. optics-coreSEvaluate each action in the structure from left to right, and collect the results.sequenceOf each ([1,2],[3,4])[(1,3),(1,4),(2,3),(2,4)]  "a   "a  [  o "a  o [  optics-coreThis generalizes  to an arbitrary .Note: F handles ragged inputs more intelligently, but for non-ragged inputs:'transposeOf traversed [[1,2,3],[4,5,6]][[1,4],[2,5],[3,6]]  "a    optics-coreThis generalizes  to an arbitrary .  "a    accumulates  from left to right. optics-coreThis generalizes  to an arbitrary .  "a    accumulates  from right to left. optics-coreThis permits the use of  over an arbitrary .  "a    optics-coreThis permits the use of  over an arbitrary .  "a    optics-core Try to map a function over this 5, returning Nothing if the traversal has no targets.failover (element 3) (*2) [1,2]Nothingfailover _Left (*2) (Right 4)Nothingfailover _Right (*2) (Right 4)Just (Right 8) optics-core Version of  strict in the application of f. optics-core Construct a  via the c class.   =   optics-coreThis allows you to 4 the elements of a traversal in the opposite order. optics-core turns a  into a .Note:X You should really try to maintain the invariant of the number of children in the list.-('a','b','c') & partsOf each .~ ['x','y','z'] ('x','y','z')pAny extras will be lost. If you do not supply enough, then the remainder will come from the original structure.1('a','b','c') & partsOf each .~ ['w','x','y','z'] ('w','x','y'))('a','b','c') & partsOf each .~ ['x','y'] ('x','y','c')+('b', 'a', 'd', 'c') & partsOf each %~ sort('a','b','c','d')So technically, this is only a 8 if you do not change the number of results it returns. optics-coreConvert a traversal to an : that visits the first element of the original traversal.For the fold version see N.!"foo" & singular traversed .~ 'z'"zoo"..An indexed version of a .None&'./48=>?@ACHPSUVX_k< optics-coreCType synonym for a type-preserving van Laarhoven indexed traversal.  optics-coreBType synonym for a type-modifying van Laarhoven indexed traversal.  optics-core5Type synonym for a type-preserving indexed traversal.  optics-core4Type synonym for a type-modifying indexed traversal.  optics-coreABuild an indexed traversal from the van Laarhoven representation.   M   "a [   M   "a [   optics-core/Map each element of a structure targeted by an  \ (supplying the index), evaluate these actions from left to right, and collect the results.EThis yields the van Laarhoven representation of an indexed traversal. optics-core A version of   with the arguments flipped. optics-core Generalizes  to an arbitrary  .& accumulates state from left to right.  o "a  o M Y  optics-core Generalizes  to an arbitrary  .& accumulates state from right to left.  o "a  o M Y  optics-coreThis permits the use of  over an arbitrary  . optics-coreThis permits the use of  over an arbitrary  . optics-core5Try to map a function which uses the index over this   , returning Z if the   has no targets. optics-core Version of + strict in the application of the function. optics-coreIndexed traversal via the  class.    "a  2iover (itraversed <%> itraversed) (,) ["ab", "cd"]5[[((0,0),'a'),((0,1),'b')],[((1,0),'c'),((1,1),'d')]] optics-coreFilter results of an  0 that don't satisfy a predicate on the indices..toListOf (itraversed %& indices even) "foobar""foa" optics-coreThis allows you to = the elements of an indexed traversal in the opposite order. optics-core Traverse selected elements of a 2 where their ordinal positions match a predicate. optics-coreTraverse elements of a c< container where their ordinal positions match a predicate.  "a    optics-core Traverse the nth element of a  if it exists. optics-core Traverse the nth element of a c container.  "a    optics-coreAn indexed version of : that receives the entire list of indices as its indices. optics-core#Convert an indexed traversal to an t: that visits the first element of the original traversal.For the fold version see .*[1,2,3] & iover (isingular itraversed) (-)[-1,2,3].y         y. ;An  ; for each element of a (potentially monomorphic) container.None&'/48=>?@ACHPSUVX_k1W optics-coreExtract 2 element of a (potentially monomorphic) container.over each (*10) (1,2,3) (10,20,30)*iover each (\i a -> a*10 + succ i) (1,2,3) (11,22,33)  optics-core  ::  i =>   i ( i a) ( i b) a b! optics-core  ::   [Int] ( a) ( b) a b" optics-core  ::    (e a) (e b) a b# optics-core  ::   () ( a) ( b) a b$ optics-core  ::   () ( a) ( b) a b% optics-core  ::    (NonEmpty a) (NonEmpty b) a b& optics-core  ::    [a] [b] a b' optics-core  ::    ( a) ( b) a b( optics-core  ::   k ( k a) ( k b) a b) optics-core  :: ( a,  b) =>   (Either () ()) ( a) ( b) a b* optics-core  ::   ( () ()) ( a a) ( b b) a b+ optics-core  ::   C (a, a, a, a, a, a, a, a, a, a) (b, b, b, b, b, b, b, b, b, b) a b, optics-core  ::   = (a, a, a, a, a, a, a, a, a) (b, b, b, b, b, b, b, b, b) a b- optics-core  ::   7 (a, a, a, a, a, a, a, a) (b, b, b, b, b, b, b, b) a b. optics-core  ::   1 (a, a, a, a, a, a, a) (b, b, b, b, b, b, b) a b/ optics-core  ::   * (a, a, a, a, a, a) (b, b, b, b, b, b) a b0 optics-core  ::   $ (a, a, a, a, a) (b, b, b, b, b) a b1 optics-core  ::    (a, a, a, a) (b, b, b, b) a b2 optics-core  ::    (a, a, a) (b, b, b) a b3 optics-core  ::    (a, a) (b, b) a b$Core definitions for indexed optics.None&'./48=>?@ACHPSUVX_kM 4 optics-core,Class for optic kinds that can have indices.5 optics-core5Convert an indexed optic to its unindexed equivalent.6 optics-coreACompose two indexed optics. Their indices are composed as a pair..itoListOf (ifolded <%> ifolded) ["foo", "bar"]I[((0,0),'f'),((0,1),'o'),((0,2),'o'),((1,0),'b'),((1,1),'a'),((1,2),'r')]7 optics-coreCompose two indexed optics and drop indices of the left one. (If you want to compose a non-indexed and an indexed optic, you can just use (t).)-itoListOf (ifolded %> ifolded) ["foo", "bar"]1[(0,'f'),(1,'o'),(2,'o'),(0,'b'),(1,'a'),(2,'r')]8 optics-coreCompose two indexed optics and drop indices of the right one. (If you want to compose an indexed and a non-indexed optic, you can just use (t).)-itoListOf (ifolded <% ifolded) ["foo", "bar"]1[(0,'f'),(0,'o'),(0,'o'),(1,'b'),(1,'a'),(1,'r')]9 optics-coreRemap the index.(itoListOf (reindexed succ ifolded) "foo"[(1,'f'),(2,'o'),(3,'o')]+itoListOf (ifolded %& reindexed succ) "foo"[(1,'f'),(2,'o'),(3,'o')]: optics-core1Flatten indices obtained from two indexed optics.;itoListOf (ifolded % ifolded %& icompose (,)) ["foo","bar"]I[((0,0),'f'),((0,1),'o'),((0,2),'o'),((1,0),'b'),((1,1),'a'),((1,2),'r')]; optics-core3Flatten indices obtained from three indexed optics.QitoListOf (ifolded % ifolded % ifolded %& icompose3 (,,)) [["foo","bar"],["xyz"]][((0,0,0),'f'),((0,0,1),'o'),((0,0,2),'o'),((0,1,0),'b'),((0,1,1),'a'),((0,1,2),'r'),((1,0,0),'x'),((1,0,1),'y'),((1,0,2),'z')]< optics-core2Flatten indices obtained from four indexed optics.= optics-core2Flatten indices obtained from five indexed optics.> optics-coreAFlatten indices obtained from arbitrary number of indexed optics.t)*+-./1tijklmnopqrstuvwxyz{|}~     456789:;<=>45t6789:;<=>69 79 89 *The core optics functionality re-exported.None&'/48=>?@ACHPSUVX_kQu!"#'()*+,-./01234@jklopstuv@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    !"#$%&'()*+,-./01234567nop     456789:;<=><Optics for working with es.None&'/48=>?@ACHPSUVX_klF optics-coreA e is isomorphic to a   m "a m 4 FSeq.fromList [1,2,3] ^. viewL1 :< fromList [2,3]Seq.empty ^. viewLEmptyLEmptyL ^. re viewL fromList []&review viewL $ 1 Seq.:< fromList [2,3]fromList [1,2,3]G optics-coreA e is isomorphic to a   m "a m 4 GSeq.fromList [1,2,3] ^. viewRfromList [1,2] :> 3Seq.empty ^. viewREmptyREmptyR ^. re viewR fromList []&review viewR $ fromList [1,2] Seq.:> 3fromList [1,2,3]H optics-coreTraverse the first n elements of a e#fromList [1,2,3,4,5] ^.. slicedTo 2[1,2]*fromList [1,2,3,4,5] & slicedTo 2 %~ (*10)fromList [10,20,3,4,5]'fromList [1,2,4,5,6] & slicedTo 10 .~ 0fromList [0,0,0,0,0]I optics-coreTraverse all but the first n elements of a e%fromList [1,2,3,4,5] ^.. slicedFrom 2[3,4,5],fromList [1,2,3,4,5] & slicedFrom 2 %~ (*10)fromList [1,2,30,40,50])fromList [1,2,3,4,5] & slicedFrom 10 .~ 0fromList [1,2,3,4,5]J optics-core(Traverse all the elements numbered from i to j of a e*fromList [1,2,3,4,5] & sliced 1 3 %~ (*10)fromList [1,20,30,4,5]#fromList [1,2,3,4,5] ^.. sliced 1 3[2,3]&fromList [1,2,3,4,5] & sliced 1 3 .~ 0fromList [1,0,0,4,5]K optics-core Construct a e from a fold.seqOf folded ["hello","world"]fromList ["hello","world"]7seqOf (folded % _2) [("hello",1),("world",2),("!!!",3)]fromList [1,2,3]FGHIJKFGJHIK==      !"#$%&'()*+,-./0123456789: ^ s ; <=>?@ABhCDEPFjGH I J J K L M N N OPQRRSSTTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   !ODTEFSB@"l"""""""#######g##kVWXCA $ $ $ $ $        U%% %!%>%"%#%$%%%&%'%(%x%)&*&+','-'.'/'0(,(-(.(/(01|23456789):);*<*=+>+?,@,A,,B,C,D,E,F,G,H,I,J,K,L,M,N,O-P-G-Q-R-S-T-U-V-W-X-YZ~ [ }\]^_`_abcdoefghijklmnopq.r.s.t.u.v.w.x.y.z.{/|/}/~///////000000000000000000r0q000000000000000000000000000000000000000000000000000000000000001{1z111111111111111111111222222222222222222222233p3K33333Q444444 44 4 4 5 6666666666666666666 6!6"6#6$6%6&6'6(6)6*6+6,6-6.6/606162636465767778797:7;7<7=7>7?7@7A7B8C8D88E8F8G8H8I8J8K8L8M8N9O9P:Q:O:P R I S H T Z U V W X Y Z [ \ ] R ^ _ ]`abicmdefghijYMklmnopn;q;r;s;t;u;v;w;x;y;z;{;|;};~;;;;;;;;?<<<<<<vwv,,-u66666666       7C888888 !"#$%&'()*+,-./&optics-core-0.3-AO2AfMctsnL4QbkxVQq6eF Optics.OpticOptics.Internal.UtilsOptics.Internal.BiOptics.Internal.Optic.TypeLevelOptics.Internal.Optic.Types Optics.ReviewOptics.ReversedLens Optics.FoldOptics.AffineFold Optics.GetterOptics.ReversedPrismOptics.IxSetterOptics.TraversalOptics.AffineTraversal Optics.Prism Optics.IxLens Optics.IsoOptics.Internal.Optic.SubtypingOptics.Internal.Optic Optics.LabelOptics.Internal.IndexedOptics.Indexed.CoreOptics.Internal.Fold Optics.CoerceData.Typeable.OpticsOptics.Internal.SetterOptics.Internal.TraversalOptics.IxTraversal Optics.IxFoldOptics.Internal.Indexed.ClassesOptics.Internal.IxSetterOptics.Internal.IxFoldOptics.Internal.IxTraversalOptics.IxAffineFoldOptics.IxAffineTraversalOptics.IxGetter Optics.LensData.Tree.OpticsData.Map.OpticsData.IntMap.OpticsData.Maybe.OpticsData.List.OpticsData.Either.Optics Optics.ReOptics.ReadOnlyOptics.MappingGHC.Generics.OpticsData.Tuple.OpticsOptics.Empty.CoreOptics.Cons.Core Optics.SetterOptics.OperatorsOptics.Operators.UnsafeOptics.At.Core Optics.ArrowNumeric.OpticsData.Set.OpticsData.IntSet.OpticsOptics.Each.CoreData.Sequence.OpticsOpticLensnoIxlastOfilastOfheadOfiheadOffoldVLfoldedfoldringgetting Traversal TraversalVLpreviewoverOpticsindicesfilteredFold atraverseOfmapped traversedfailing traverseOf_imappedifoldVLifolded ifoldring itraversed traverseOfPreludeunfoldrsingularGetterIso Data.Maybe fromMaybeData.SemigroupgetMaxMaxgetMinMin iatraverseOfAffineTraversal IxTraversalunsafeFilteredIxFold IxAffineFold itraverseOf isingularequalitySetter_1'_1viewData.MapMap Data.Typeablecast alongside Optics.Empty_EmptyAsEmptyPrism ReversedPrism ReversedLensReviewtore Control.Monadjoin Data.WordWord8.~^. Data.Char intToDigit digitToIntNumeric showSigned readSigned Data.List transposeData.Traversable mapAccumL mapAccumR Optics.Corebase Data.Function& Data.Functor<&>.indexed-profunctors-0.1-ADpTF6Jk6F1CzB9ZonleDdData.Profunctor.Indexed.##.Bicontravariant contrabimap contrafirst contrasecond Bifunctorbimapfirstsecondlphantomrphantom$fBifunctorTagged$fBicontravariantIxForgetM$fBicontravariantIxForget$fBicontravariantForgetM$fBicontravariantForget CurryComposecomposeNAppendCurry AnyHasRep RepDefinedShowEliminationsAppendEliminations ShowOperatorsShowSymbolsWithOriginShowSymbolWithOrigin QuoteSymbol QuoteTypeWithIxNoIxIxList$fCurryCompose:$fCurryCompose[] ConstraintsA_ReviewA_ReversedLensA_Fold An_AffineFoldA_GetterA_ReversedPrismA_Setter A_TraversalAn_AffineTraversalA_PrismA_LensAn_Iso OpticKindJoinTraversalEliminationsSetterEliminationsReviewEliminationsPrismEliminationsLensEliminationsIsoEliminationsGetterEliminationsFoldEliminationsAffineTraversalEliminationsAffineFoldEliminationsEliminationFormsIsimplies$fIsA_TraversalA_Setter$fIsA_TraversalA_Fold$fIsAn_AffineFoldA_Fold$fIsAn_AffineTraversalA_Setter$fIsAn_AffineTraversalA_Fold!$fIsAn_AffineTraversalA_Traversal#$fIsAn_AffineTraversalAn_AffineFold$fIsA_GetterA_Fold$fIsA_GetterAn_AffineFold$fIsA_LensA_Setter$fIsA_LensA_Fold$fIsA_LensA_Traversal$fIsA_LensAn_AffineFold$fIsA_LensAn_AffineTraversal$fIsA_LensA_Getter$fIsA_PrismA_Setter$fIsA_PrismA_Fold$fIsA_PrismA_Traversal$fIsA_PrismAn_AffineFold$fIsA_PrismAn_AffineTraversal$fIsA_PrismA_Review$fIsA_ReversedPrismA_Fold $fIsA_ReversedPrismAn_AffineFold$fIsA_ReversedPrismA_Getter$fIsA_ReversedLensA_Review$fIsAn_IsoA_Setter$fIsAn_IsoA_Fold$fIsAn_IsoA_Traversal$fIsAn_IsoAn_AffineFold$fIsAn_IsoAn_AffineTraversal$fIsAn_IsoA_Getter$fIsAn_IsoA_Lens$fIsAn_IsoA_Review$fIsAn_IsoA_Prism$fIsAn_IsoA_ReversedPrism$fIsAn_IsoA_ReversedLens$fIskk$fIsklGeneralLabelOpticgeneralLabelOptic LabelOptic' LabelOptic labelOpticOptic__Optic_Optic'getOptic castOptic%%%%&$fAppendProof:ys:$fAppendProof[]yszs$fIsLabelnameOptic&$fGeneralLabelOpticnamekstabrepDefined$fLabelOpticnamekstab$fLabelOpticnamekVoid0Void0abIndexing runIndexingIntT ShowTypesHasSingleIndexNonEmptyIndicesAcceptsEmptyIndicesunIntTindexing conjoined$fAcceptsEmptyIndicesf[]$fAcceptsEmptyIndicesf:$fNonEmptyIndices:$fNonEmptyIndices[]$fHasSingleIndex[]i$fHasSingleIndex:i$fHasSingleIndex:i0$fHasSingleIndex:i1$fHasSingleIndex:i2$fHasSingleIndex:i3$fHasSingleIndex:i4$fApplicativeIndexing$fFunctorIndexing RightmostRPureRLeafRStepLeftmostLPureLLeafLStepfoldVL__folded__ foldring__ getLeftmost getRightmost$fMonoidLeftmost$fSemigroupLeftmost$fMonoidRightmost$fSemigroupRightmostviewscoerceScoerceTcoerceAcoerceBAffineTraversalVL'AffineTraversalVLAffineTraversal' atraversalwithAffineTraversal atraversalVLmatching_cast_gcast AffineFoldafoldVLpreviews atraverseOf_afoldingafailingisn'tmapped__ traversed__OrT Traversed Identity' wrapIdentity'unwrapIdentity' runTraversedwrapOrTuncurry'$fMappingIxStar $fMappingStar$fApplicativeIdentity'$fMonoidTraversed$fSemigroupTraversed$fApplicativeOrT$fFunctorIdentity' $fFunctorOrTTraversableWithIndex itraverseFoldableWithIndexifoldMapifoldrifoldl'FunctorWithIndeximap itraverse_ifor_itoListifor$fTraversableWithIndexVoidK1$fFoldableWithIndexVoidK1$fFunctorWithIndexVoidK1$fTraversableWithIndexiRec1$fFoldableWithIndexiRec1$fFunctorWithIndexiRec1$fTraversableWithIndexEither:+:$fFoldableWithIndexEither:+:$fFunctorWithIndexEither:+:$fTraversableWithIndexEither:*:$fFoldableWithIndexEither:*:$fFunctorWithIndexEither:*:$fTraversableWithIndex(,):.:$fFoldableWithIndex(,):.:$fFunctorWithIndex(,):.:$fTraversableWithIndex()Par1$fFoldableWithIndex()Par1$fFunctorWithIndex()Par1$fTraversableWithIndexVoidU1$fFoldableWithIndexVoidU1$fFunctorWithIndexVoidU1$fTraversableWithIndexVoidV1$fFoldableWithIndexVoidV1$fFunctorWithIndexVoidV1$fFunctorWithIndex(,)ReaderT $fTraversableWithIndexiIdentityT$fFoldableWithIndexiIdentityT$fFunctorWithIndexiIdentityT$fTraversableWithIndexiReverse$fFoldableWithIndexiReverse$fFunctorWithIndexiReverse $fTraversableWithIndexiBackwards$fFoldableWithIndexiBackwards$fFunctorWithIndexiBackwards$fTraversableWithIndexVoidProxy$fFoldableWithIndexVoidProxy$fFunctorWithIndexVoidProxy$fTraversableWithIndex[]Tree$fFoldableWithIndex[]Tree$fFunctorWithIndex[]Tree#$fTraversableWithIndexEitherProduct $fFoldableWithIndexEitherProduct$fFunctorWithIndexEitherProduct$fTraversableWithIndexEitherSum$fFoldableWithIndexEitherSum$fFunctorWithIndexEitherSum $fTraversableWithIndex(,)Compose$fFoldableWithIndex(,)Compose$fFunctorWithIndex(,)Compose$fTraversableWithIndexiArray$fFoldableWithIndexiArray$fFunctorWithIndexiArray$fTraversableWithIndexkMap$fFoldableWithIndexkMap$fFunctorWithIndexkMap$fTraversableWithIndexIntIntMap$fFoldableWithIndexIntIntMap$fFunctorWithIndexIntIntMap$fTraversableWithIndexIntSeq$fFoldableWithIndexIntSeq$fFunctorWithIndexIntSeq$fTraversableWithIndex()Maybe$fFoldableWithIndex()Maybe$fFunctorWithIndex()Maybe!$fTraversableWithIndexIntNonEmpty$fFoldableWithIndexIntNonEmpty$fFunctorWithIndexIntNonEmpty $fTraversableWithIndexIntZipList$fFoldableWithIndexIntZipList$fFunctorWithIndexIntZipList$fTraversableWithIndexInt[]$fFoldableWithIndexInt[]$fFunctorWithIndexInt[]$fFunctorWithIndexr->$fTraversableWithIndexk(,)$fFoldableWithIndexk(,)$fFunctorWithIndexk(,)"$fTraversableWithIndexVoidConstant$fFoldableWithIndexVoidConstant$fFunctorWithIndexVoidConstant$fTraversableWithIndexVoidConst$fFoldableWithIndexVoidConst$fFunctorWithIndexVoidConst $fTraversableWithIndex()Identity$fFoldableWithIndex()Identity$fFunctorWithIndex()Identity imapped__ ifoldVL__ ifolded__ ifoldring__ itraversed__foldOf foldMapOffoldrOffoldlOf'toListOfforOf_ sequenceOf_foldingunfoldedpre backwards_summinghashasn'tandOforOfanyOfallOfnoneOf productOfsumOfasumOfmsumOfelemOf notElemOflengthOf maximumOf minimumOf maximumByOf minimumByOffindOffindMOflookupOfiafoldVLipreview ipreviews iatraverseOf_ iafolding filteredBy iafailingIxAffineTraversalVL'IxAffineTraversalVLIxAffineTraversal'IxAffineTraversal iatraversal iatraversalVLunsafeFilteredByignored ifoldMapOfifoldrOf ifoldlOf' itoListOf itraverseOf_iforOf_ifoldingipre ifiltered ibackwards_isummingifailingianyOfiallOfinoneOfifindOfifindMOfIxGetterito selfIndexiviewiviews IxLensVL'IxLensVLIxLens'IxLensilensilensVL toIxLensVL withIxLensVLdevoid IxSetter'IxSetterioveriover'isetiset'isetsLensVL'LensVLLens'lenswithLenslensVLtoLensVL withLensVL equality'chosenunitedrootbranchestoMapOfltgtlegePrism'prismprism' withPrismasidewithoutbelowonlynearly_Nothing_Justprefixedsuffixed_Left_RightReversibleOptic ReversedOptic$fReversibleOpticA_Review$fReversibleOpticA_Getter$fReversibleOpticA_ReversedLens$fReversibleOpticA_Lens $fReversibleOpticA_ReversedPrism$fReversibleOpticA_Prism$fReversibleOpticAn_Iso $fChoiceRe $fCochoiceRe $fStrongRe $fCostrongRe$fBicontravariantRe $fBifunctorRe$fProfunctorRe ToReadOnly$fToReadOnlyA_Foldstab$fToReadOnlyAn_AffineFoldstab$fToReadOnlyA_Getterstab$fToReadOnlyA_ReversedPrismstab$fToReadOnlyA_Traversalstab"$fToReadOnlyAn_AffineTraversalstab$fToReadOnlyA_Prismstab$fToReadOnlyA_Lensstab$fToReadOnlyAn_Isostab ReversedLens'ReversedPrism'reviewuntoSwappedswappedIso'isowithIsoauundersimplecoerced coercedTocoerced1nonnon'anoncurried uncurriedflipped involuted$fSwappedEither $fSwapped(,) MappingOptic MappedOpticmapping"$fMappingOpticA_ReversedLensfgstab$fMappingOpticA_Prismfgstab$fMappingOpticA_Reviewfgstab$fMappingOpticA_Lensfgstab#$fMappingOpticA_ReversedPrismfgstab$fMappingOpticA_Getterfgstab$fMappingOpticAn_Isofgstabgenericgeneric1_V1_U1_Par1_Rec1_K1_M1_L1_R1Field9_9Field8_8Field7_7Field6_6Field5_5Field4_4Field3_3Field2_2Field1_2'_3'_4'_5'_6'_7'_8'_9'$fGIxednM1M1ab$fGIxedn:*::*:ab$fGIxedZK1K1ab$fGIxed'Tnss'ts'ab$fField1(,,,,,,,,)(,,,,,,,,)aa'$fField1(,,,,,,,)(,,,,,,,)aa'$fField1(,,,,,,)(,,,,,,)aa'$fField1(,,,,,)(,,,,,)aa'$fField1(,,,,)(,,,,)aa'$fField1(,,,)(,,,)aa'$fField1(,,)(,,)aa'$fField1(,)(,)aa'$fField1:*::*:ff'$fField1ProductProductff'$fField1IdentityIdentityab$fGIxed'Fnss'st'ab$fField2(,,,,,,,,)(,,,,,,,,)bb'$fField2(,,,,,,,)(,,,,,,,)bb'$fField2(,,,,,,)(,,,,,,)bb'$fField2(,,,,,)(,,,,,)bb'$fField2(,,,,)(,,,,)bb'$fField2(,,,)(,,,)bb'$fField2(,,)(,,)bb'$fField2(,)(,)bb'$fField2:*::*:gg'$fField2ProductProductgg'$fField3(,,,,,,,,)(,,,,,,,,)cc'$fField3(,,,,,,,)(,,,,,,,)cc'$fField3(,,,,,,)(,,,,,,)cc'$fField3(,,,,,)(,,,,,)cc'$fField3(,,,,)(,,,,)cc'$fField3(,,,)(,,,)cc'$fField3(,,)(,,)cc'$fField4(,,,,,,,,)(,,,,,,,,)dd'$fField4(,,,,,,,)(,,,,,,,)dd'$fField4(,,,,,,)(,,,,,,)dd'$fField4(,,,,,)(,,,,,)dd'$fField4(,,,,)(,,,,)dd'$fField4(,,,)(,,,)dd'$fField5(,,,,,,,,)(,,,,,,,,)ee'$fField5(,,,,,,,)(,,,,,,,)ee'$fField5(,,,,,,)(,,,,,,)ee'$fField5(,,,,,)(,,,,,)ee'$fField5(,,,,)(,,,,)ee'$fField6(,,,,,,,,)(,,,,,,,,)ff'$fField6(,,,,,,,)(,,,,,,,)ff'$fField6(,,,,,,)(,,,,,,)ff'$fField6(,,,,,)(,,,,,)ff'$fField7(,,,,,,,,)(,,,,,,,,)gg'$fField7(,,,,,,,)(,,,,,,,)gg'$fField7(,,,,,,)(,,,,,,)gg'$fField8(,,,,,,,,)(,,,,,,,,)hh'$fField8(,,,,,,,)(,,,,,,,)hh'$fField9(,,,,,,,,)(,,,,,,,,)ii'Empty $fAsEmptySeq$fAsEmptyIntSet $fAsEmptySet$fAsEmptyIntMap $fAsEmptyMap$fAsEmptyZipList $fAsEmpty[] $fAsEmpty(,,) $fAsEmpty(,) $fAsEmptyDual$fAsEmptyFirst $fAsEmptyLast$fAsEmptyMaybe $fAsEmptySum$fAsEmptyProduct$fAsEmptyEvent $fAsEmptyAll $fAsEmptyAny $fAsEmpty()$fAsEmptyOrderingSnoc_SnocCons_Cons:>:<<|consuncons_head_tail_init_last|>snocunsnoc$fConsSeqSeqab$fConsZipListZipListab $fCons[][]ab$fSnocSeqSeqab$fSnocZipListZipListab $fSnoc[][]abSetter'over'setset'sets^?^..#%~%!~!~?~?!~^?!AtatIxedIxKindixIxValueContainscontainsIndexixAtat'sans $fContainsSet$fContainsIntSet$fAtSet $fAtIntSet$fAtMap $fAtIntMap $fAtMaybe$fIxed(,,,,,,,,)$fIxed(,,,,,,,)$fIxed(,,,,,,) $fIxed(,,,,,) $fIxed(,,,,) $fIxed(,,,) $fIxed(,,) $fIxed(,) $fIxedUArray $fIxedArray $fIxedIntSet $fIxedSet $fIxedMap $fIxedIntMap $fIxedSeq $fIxedTree$fIxedIdentity$fIxedNonEmpty$fIxed[] $fIxedMaybe$fIxed-> ArrowOpticoverAassignA$fVisitingWrappedArrow$fChoiceWrappedArrow$fStrongWrappedArrow$fProfunctorWrappedArrow$fArrowWrappedArrow$fCategoryTYPEWrappedArrow!$fArrowOpticAn_AffineTraversalarr$fArrowOpticA_Prismarr$fArrowOpticA_Lensarr$fArrowOpticAn_IsoarrIntegralintegralbinaryoctaldecimalhexadding subtracting multiplyingdividingexponentiatingnegated setmappedsetOfmembers TraversalVL' Traversal' traversalVLforOf sequenceOf transposeOf mapAccumLOf mapAccumROfscanl1Ofscanr1Offailover failover' backwardspartsOfIxTraversalVL' IxTraversalVL IxTraversal' itraversalVLiforOf imapAccumLOf imapAccumROf iscanl1Of iscanr1Of ifailover ifailover' ibackwards elementsOfelements elementOfelementipartsOfEacheach$fEachiArrayArrayab$fEach[]TreeTreeab$fEachIntSeqSeqab$fEach()MaybeMaybeab$fEach()IdentityIdentityab$fEachIntNonEmptyNonEmptyab$fEachInt[][]ab$fEachIntIntMapIntMapab$fEachkMapMapab$fEachEitherComplexComplexab$fEachEitherEitherEitherab!$fEachInt(,,,,,,,,,)(,,,,,,,,,)ab$fEachInt(,,,,,,,,)(,,,,,,,,)ab$fEachInt(,,,,,,,)(,,,,,,,)ab$fEachInt(,,,,,,)(,,,,,,)ab$fEachInt(,,,,,)(,,,,,)ab$fEachInt(,,,,)(,,,,)ab$fEachInt(,,,)(,,,)ab$fEachInt(,,)(,,)ab$fEachInt(,)(,)abIxOptic<%>%><% reindexedicompose icompose3 icompose4 icompose5 icomposeN$fIxOpticA_Setterstab$fIxOpticA_Foldstab$fIxOpticA_Traversalstab$fIxOpticAn_AffineFoldstab$fIxOpticAn_AffineTraversalstab$fIxOpticA_Lensstab$fIxOpticA_GetterstabviewLviewRslicedTo slicedFromslicedseqOf ProfunctorGHC.Base.fmap Data.Foldablefoldr AppendProof Unsafe.Coerce unsafeCoerce GHC.MaybeJustghc-primGHC.Primcoerce Applicativepure<*>Functor Data.EithereitherconstNothingidGHC.RealevenGHC.Enumsucc GHC.Classes/=Data.Typeable.InternalTypeablegcast Data.Tupleuncurry TraversableFoldablecontainers-0.6.0.1Data.Sequence.InternalSeq traverse_ sequenceA_ GHC.TypesTrueandorallData.Semigroup.InternalProductproduct getProductSumsumgetSumasummsumelemnotElemlengthmaximumGHC.ErrerrorminimumOrdering maximumBy minimumByfindGHC.Listlookup Data.VoidVoidEither Data.TreeTree subForestData.Map.InternalunionData.IntMap.InternalMaybenullLeftRightRere__ getting__Data.BifunctornotcurrymapStringCharheadtail$$!Data.Set.InternalSetGHC.ArrArrayD:R:IxValue(,,,,,,,,)IntD:R:IxValue(,,,,,,,)D:R:IxValue(,,,,,,)D:R:IxValue(,,,,,)D:R:IxValue(,,,,)D:R:IxValue(,,,)D:R:IxValue(,,)D:R:IxValue(,) array-0.5.3.0Data.Array.Base!//BooloverA__ integer-gmpGHC.Integer.TypeInteger intToDigit' digitToInt' digitToIntMayisDigit' showSigned' readSigned'GHC.NumnegateData.IntSet.InternalIntSetsequencetraversetransformers-0.5.5.0Control.Monad.Trans.State.LazyStatescanl1scanr1IxData.Functor.IdentityIdentityIntMap GHC.Float RealFloat Data.ComplexComplexViewLviewlViewRviewr