h$B~2      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n Noneopqrstuvwxyz{|}~(C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone-./>  generic-optics,Records that have a field with a given name.&This is meant to be more general than , but that is not quite the case due to the lack of functional dependencies. The types s and t must be applications of the same type constructor. In contrast,  also requires the parameters of that type constructor to have representational roles.One use case of   over  is for records defined with  data instance.generic-optics,Records that have a field with a given name.generic-optics1A lens that focuses on a field with a given name.human ^. field @"age"50 Type changing:t humanhuman :: Human Bool(:t human & field @"other" .~ (42 :: Int)2human & field @"other" .~ (42 :: Int) :: Human Inthuman & field @"other" .~ 42Human {name = "Tunyasz", age = 50, address = "London", other = 42} Type errorshuman & field @"weight" .~ 42...... The type Human Bool does not contain a field named 'weight'....human & field @"address" .~ "".../... Not all constructors of the type Human Bool$... contain a field named 'address'.#... The offending constructors are:... HumanNoAddress...generic-opticsgetField @"age" human50generic-opticssetField @"age" 60 humanHuman {name = "Tunyasz", age = 60, address = "London", other = False}generic-opticsSee Note [Uncluttering type signatures] >>> :t field field :: HasField field s t a b => Lens s t a b  (C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone./>? Y(C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone'(./8>?   (C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone-./>?!generic-optics.Records that have a field at a given position.This class gives the minimal constraints needed to define this lens. For common uses, see '.#generic-optics.Records that have a field at a given position.The difference between ' and % is similar to the one between  and . See .'generic-optics.Records that have a field at a given position.(generic-optics3A lens that focuses on a field at a given position.human ^. position @1 "Tunyasz"human & position @3 .~ "Berlin"6Human {name = "Tunyasz", age = 50, address = "Berlin"} Type errorshuman & position @4 .~ "Berlin"...9... The type Human does not contain a field at position 4...)generic-opticsgetPosition @2 human50*generic-opticssetPosition @2 60 human6Human {name = "Tunyasz", age = 60, address = "London"}+generic-opticsSee Note [Uncluttering type signatures] >>> :t position position :: HasPosition i s t a b => Lens s t a b !"#$%&'()* '(#$%&!")*(C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone./>?1generic-opticsStructural subtype relationshipsub is a (structural) subtype of sup*, if its fields are a subset of those of sup.2generic-optics6Structural subtype lens. Given a subtype relationship  sub :< sup, we can focus on the sub structure of sup.human ^. super @Animal#Animal {name = "Tunyasz", age = 50}+set (super @Animal) (Animal "dog" 10) human2Human {name = "dog", age = 10, address = "London"}3generic-optics>> :t super  Int super .Int :: Subtype Int sub => Lens sub sub Int Int6generic-opticsSee Note [Uncluttering type signatures] >>> :t super super :: Subtype sup sub => Lens sub sub sup sup12341234(C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone >?9generic-optics-Records that have a field with a unique type.:generic-opticsA lens that focuses on a field with a unique type in its parent type.human ^. typed @Int50 Type errorshuman ^. typed @String......;... The type Human contains multiple values of type [Char].... The choice of value is thus ambiguous. The offending constructors are: ... Human... HumanNoTall...human ^. typed @Bool......... Not all constructors of the type Human contain a field of type Bool.#... The offending constructors are:... HumanNoTall...;generic-opticsGet field at type.<generic-opticsSet field at type.=generic-opticsSee Note [Uncluttering type signatures] >>> :t typed typed :: HasType a s => Lens s s a aNote that this might not longer be needed given the above 'HasType a a' instance.9:;<9:;<(C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone.>}Ageneric-opticsA lens that focuses on a part of a product as identified by some selector. Currently supported selectors are field names, positions and unique types.human ^. the @Int50human ^. the @"name" "Tunyasz"human ^. the @3"London"@A@A(C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone-./9>Egeneric-optics*Traverse all types in the given structure.For example, to update all s in a WTree (Maybe String) String, we can writemyTree = WithWeight (Fork (Leaf (Just "hello")) (Leaf Nothing)) "world"$over (types @String) (++ "!") myTreeWithWeight (Fork (Leaf (Just "hello!")) (Leaf Nothing)) "world!"The traversal is deep, which means that not just the immediate children are visited, but all nested values too.Fgeneric-opticsEFEF(C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone- !"#$%&'()*14239<:;@AEF (C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone/>?$NGgeneric-optics/Sums that have a constructor with a given name.This class gives the minimal constraints needed to define this prism. For common uses, see HasConstructor.Kgeneric-optics/Sums that have a constructor with a given name.The difference between HasConstructor and HasConstructor_ is similar to the one between  and . See .Mgeneric-optics/Sums that have a constructor with a given name.Ngeneric-optics5A prism that projects a named constructor from a sum.dog ^? _Ctor @"Dog"2Just (MkDog {name = "Shep", age = 3, fieldA = 30})dog ^? _Ctor @"Cat"Nothingcat ^? _Ctor @"Cat"Just ("Mog",5),_Ctor @"Cat" # ("Garfield", 6) :: Animal IntCat "Garfield" 6 Type errorscat ^? _Ctor @"Turtle"......... The type Animal Int does not contain a constructor named "Turtle"...Ogeneric-opticsSee Note [Uncluttering type signatures] >>> :t _Ctor _Ctor :: AsConstructor ctor s t a b => Prism s t a bGHIJKLMNMNKLIJGH (C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone >?*lUgeneric-optics)Structural subtyping between sums. A sum Sub is a subtype of another sum Sup if a value of Sub can be given (modulo naming of constructors) whenever a value of Sup5 is expected. In the running example for instance, FourLeggedAnimal is a subtype of Animal since a value of the former can be given as a value of the latter (renaming Dog4 to Dog and Cat4 to Cat).Vgeneric-opticsA prism that captures structural subtyping. Allows a substructure to be injected (upcast) into a superstructure or a superstructure to be downcast into a substructure (which may fail)._Sub # dog4 :: Animal%Dog (MkDog {name = "Snowy", age = 4})%cat ^? _Sub :: Maybe FourLeggedAnimalJust (Cat4 "Mog" 5)&duck ^? _Sub :: Maybe FourLeggedAnimalNothingWgeneric-optics,Injects a subtype into a supertype (upcast).Xgeneric-optics/Projects a subtype from a supertype (downcast).Ygeneric-optics5See Note [Uncluttering type signatures] >>> :t _Sub  Int _Sub *Int :: AsSubtype Int sup => Prism' sup IntZgeneric-opticsSee Note [Uncluttering type signatures] _Sub :: (AsSubtype sub sup, Data.Profunctor.Choice.Choice p, Applicative f) => p sub (f sub) -> p sup (f sup)[generic-optics?Reflexive case >>> _Sub # dog :: Animal Dog (MkDog {name = Shep , age = 3})UVWXUVWX (C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone/>?.;]generic-optics>> :t _Typed  Int _Typed #Int :: AsType Int s => Prism' s Intbgeneric-opticsSee Note [Uncluttering type signatures] >>> :t _Typed _Typed :: AsType a s => Prism' s a]^_`]^_` (C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone.>0dgeneric-opticsSums that have generic prisms.egeneric-opticsA prism that projects a sum as identified by some selector. Currently supported selectors are constructor names and unique types.dog ^? _As @"Dog"%Just (MkDog {name = "Shep", age = 3})dog ^? _As @Dog%Just (MkDog {name = "Shep", age = 3})dog ^? _As @"Cat"Nothingcat ^? _As @(Name, Age)Just ("Mog",5)cat ^? _As @"Cat"Just ("Mog",5)&_As @"Cat" # ("Garfield", 6) :: AnimalCat "Garfield" 6duck ^? _As @AgeJust 2dede(C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone1aGHIJKLMNUXVW]`^_de (C) 2020 Csongor KissBSD3*Csongor Kiss  experimental non-portableNone-/>?2hgeneric-opticsigeneric-opticsjgeneric-opticskgeneric-opticslgeneric-opticsmgeneric-opticshijklmhilmjk !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~   -generic-optics-2.2.0.0-LNaT4D2mHCzA43a9qjIfXRData.Generics.Product.TypesData.Generics.Product.ParamData.Generics.Product.FieldsData.Generics.Product.HListData.Generics.Product.PositionsData.Generics.Product.SubtypeData.Generics.Product.TypedData.Generics.Product.AnyData.Generics.Sum.ConstructorsData.Generics.Sum.SubtypeData.Generics.Sum.TypedData.Generics.Sum.AnyData.Generics.WrappedData.Generics.Internal.OpticsHasField HasField_Data.Generics.ProductData.Generics.Sum0generic-lens-core-2.2.0.0-JkcGLv80tyHBGfVucyCa19$Data.Generics.Product.Internal.TypesChildren ChGenericHasTypes HasTypesUsing typesCustomHasTypesCustomData.Generics.Internal.GenericN getStarParam StarParamParamRec HasField'field'field_fieldgetFieldsetField$fHasFieldfVoid1Void1ab$fHasField_fVoid1Void1ab$fHasField'fVoid1a$fHasField0fieldstab$fHasField_fieldstab$fHasFieldfieldstab$fHasField'fieldsaIsListlist$fIsListfgasbsHasParamparam$fHasParampVoid1Void1ab$fHasParamnstab HasPosition0 position0 HasPosition' position' HasPosition_ position_ HasPositionposition getPosition setPosition$fHasPositionfVoid1Void1ab$fHasPosition_fVoid1Void1ab$fHasPosition'isa$fHasPosition0istab$fHasPosition_istab$fHasPositionistabSubtypesuperupcastsmash$fSubtypeVoida$fSubtypeaVoid $fSubtypeaa $fSubtypebaHasTypetypedgetTypedsetTyped$fHasTypeaVoid $fHasTypeaa $fHasTypeasHasAnythe$fHasAnyTYPEastab$fHasAnySymbolfieldstab$fHasAnyNatistabtypes typesUsingAsConstructor0_Ctor0AsConstructor'_Ctor'AsConstructor__Ctor_ AsConstructor_Ctor$fAsConstructorctorVoid1Void1ab $fAsConstructor_ctorVoid1Void1ab$fAsConstructor0ctorstab$fAsConstructor_ctorstab$fAsConstructorctorstab$fAsConstructor'ctorsa AsSubtype_Sub injectSub projectSub$fAsSubtypeVoida$fAsSubtypeaVoid $fAsSubtypeaa$fAsSubtypesubsupAsType_Typed injectTyped projectTyped $fAsTypeVoida $fAsTypeaVoid $fAsTypeasAsAny_As$fAsAnyTYPEaas$fAsAnySymbolctorasWrapped wrappedIso _Unwrapped_Wrapped wrappedTo wrappedFrom $fWrappedstabbase Data.Function& Data.Functor<&>0indexed-traversable-0.1.1-Dw8MIJyvCj8IZQDXOa8TBpData.Foldable.WithIndexitoListifor_ itraverse_Data.Traversable.WithIndexifor WithIndexFunctorWithIndeximapFoldableWithIndexifoldl'ifoldr'ifoldlifoldrifoldMap ifoldMap'TraversableWithIndex itraverse&optics-core-0.4-Gvlp70bAWnZA9f97M5N17YOptics.Cons.Coreunsnocsnoc|>_last_init_tail_headunconscons<|:<:>Cons_ConsSnoc_SnocData.Tuple.Optics_9'_8'_7'_6'_5'_4'_3'_2'_1'Field1_1Field2_2Field3_3Field4_4Field5_5Field6_6Field7_7Field8_8Field9_9Optics.GenericGFieldgfield GAffineFieldgafield GPosition gposition GConstructor gconstructorGPlategplateOptics.Indexed.Core icomposeN icompose5 icompose4 icompose3icompose reindexed<%%><%>IxOpticnoIx Optics.Label LabelOptic labelOptic LabelOptic'HasGenericLabelOpticsGenericLabelOpticsOptics.Each.CoreEacheachOptics.IxTraversaliadjoin isingularipartsOfelement elementOfelements elementsOf ibackwardsindices itraversed ifailover' ifailover iscanr1Of iscanl1Of imapAccumROf imapAccumLOfiforOf itraverseOf itraversalVL IxTraversal IxTraversal' IxTraversalVLIxTraversalVL'Optics.TraversaladjoinsingularpartsOf backwardsboth traversed failover'failoverscanr1Ofscanl1Of mapAccumROf mapAccumLOf transposeOf sequenceOfforOf traverseOf traversalVL Traversal Traversal' TraversalVL TraversalVL' Optics.ArrowassignA ArrowOpticoverAOptics.At.Coresansat'ixAtIndexContainscontainsIxValueIxKindIxedixAtatOptics.Operators?!~?~!~.~%!~%~#^..^?^. Optics.Settermappedsetsset'setover'overSetterSetter'Optics.Empty.CoreEmptyAsEmpty_EmptyOptics.Mapping MappedOptic MappingOpticmapping Optics.Iso involutedflipped uncurriedcurriedanonnon'noncoerced1 coercedTocoercedsimpleequalityunderauwithIsoisoIsoIso'Swappedswapped Optics.ReviewuntoreviewReviewOptics.ReversedPrism ReversedPrismReversedPrism'Optics.ReversedLens ReversedLens ReversedLens'Optics.ReadOnly ReadOnlyOptic ToReadOnlygetting Optics.Re ReversedOpticReversibleOpticreData.Either.Optics_Right_LeftData.Maybe.Optics_Just_Nothing Optics.Prismnearlyonlybelowwithoutaside withPrismprism'prismPrismPrism' Optics.Lensunited alongside equality' withLensVLtoLensVLlensVLwithLenslensLensLens'LensVLLensVL'Optics.IxSetterimappedisetsiset'isetiover'ioverIxSetter IxSetter' Optics.IxLensisndifstdevoidchosen withIxLensVL toIxLensVLilensVLilensIxLensIxLens'IxLensVL IxLensVL'Optics.IxGetteriviewsiview selfIndexitoIxGetter Optics.IxFoldifindMOfifindOfinoneOfiallOfianyOfilastOfiheadOfifailingisumming ibackwards_ ifilteredipre ifoldringifoldingifoldediforOf_ itraverseOf_ itoListOf ifoldlOf'ifoldrOf ifoldMapOfifoldVLIxFoldOptics.IxAffineTraversalignoredunsafeFilteredBy iatraverseOf iatraversalVL iatraversalIxAffineTraversalIxAffineTraversal'IxAffineTraversalVLIxAffineTraversalVL'Optics.IxAffineFold iafailing filteredBy iafolding iatraverseOf_ ipreviewsipreviewiafoldVL IxAffineFold Optics.FoldlookupOffindMOffindOf minimumByOf maximumByOf minimumOf maximumOflengthOf notElemOfelemOfmsumOfasumOfsumOf productOfnoneOfallOfanyOforOfandOflastOfheadOfhasn'thasfailingsumming backwards_preunfoldedfoldringfoldingfolded sequenceOf_forOf_ traverseOf_toListOffoldlOf'foldrOf foldMapOffoldOffoldVLFoldOptics.AffineFoldisn'tafailingfilteredafolding atraverseOf_previewspreviewafoldVL AffineFoldOptics.AffineTraversalunsafeFilteredmatching atraverseOf atraversalVLwithAffineTraversal atraversalAffineTraversalAffineTraversal'AffineTraversalVLAffineTraversalVL' Optics.CoercecoerceBcoerceAcoerceTcoerceS Optics.GettertoviewsviewGetterOptics.Internal.Indexed conjoinedAcceptsEmptyIndicesNonEmptyIndicesHasSingleIndexOptics.Internal.Optic%&%%% castOpticgetOpticOpticOptic'Optic_Optic__Optics.Internal.Optic.SubtypingIsimpliesEliminationFormsAffineFoldEliminationsAffineTraversalEliminationsFoldEliminationsGetterEliminationsIsoEliminationsLensEliminationsPrismEliminationsReviewEliminationsSetterEliminationsTraversalEliminations JoinKinds joinKindsOptics.Internal.Optic.Types OpticKindAn_IsoA_LensA_PrismAn_AffineTraversal A_TraversalA_SetterA_ReversedPrismA_Getter An_AffineFoldA_FoldA_ReversedLensA_Review ConstraintsOptics.Internal.Optic.TypeLevelIxListNoIxWithIxShowSymbolWithOriginShowSymbolsWithOrigin ShowOperatorsAppendEliminationsShowEliminationsReverseCurryAppend CurryComposecomposeNIxEq AppendIndices appendIndices FirstRight FromRightIsLeftWhenUnlessDefined QuoteType QuoteSymbol ToOrdinal HasShapeOf normaliseLensnormalisePrism normaliseIsoGHC.BaseString