h$K;Hz      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdNone>/e optics-thProvides substitution for typesf optics-thPerform substitution for typesg optics-thProvides for the extraction of free type variables, and alpha renaming.h optics-thWhen performing substitution into this traversal you're not allowed to substitute in a name that is bound internally or you'll violate the i. laws, when in doubt generate your names with j.k optics-th Traverse free type variablesl optics-th Traverse free6 type variables paired with their kinds if applicable.m optics-th'Substitute using a map of names in for free type variables nefghklmopqrNone  optics-th%Apply arguments to a type constructor optics-thApply arguments to a function optics-th-Construct a tuple type given a list of types. optics-th4Construct a tuple value given a list of expressions. optics-th3Construct a tuple pattern given a list of patterns. optics-th&Apply arguments to a type constructor. optics-th/Generate many new names from a given base name.  optics-thFill in kind variables using info from datatype type parameters.  optics-thTemplate Haskell wants type variables declared in a forall, so we find all free type variables in a given type and declare them.  optics-thThis function works like   except that it takes a list of variables to exclude from quantification.  optics-th Transform s into a t so it's suitable e.g. for freeVariablesWellScoped or type substitution.  optics-thPass in a list of lists of extensions, where any of the given extensions will satisfy it. For example, you might need either GADTs or ExistentialQuantification, so you'd write: 6requireExtensions [[GADTs, ExistentialQuantification]]But if you need TypeFamilies and MultiParamTypeClasses, then you'd write: ;requireExtensions [[TypeFamilies], [MultiParamTypeClasses]] optics-th base name  optics-thcount   NoneS optics-th Generate a u for each constructor of a data type. Isos generated when possible. Reviews are created for constructors with existentially quantified constructors and GADTs.e.g. data FooBarBaz a = Foo Int | Bar a | Baz Int Char makePrisms ''FooBarBaz  will create _Foo :: Prism' (FooBarBaz a) Int _Bar :: Prism (FooBarBaz a) (FooBarBaz b) a b _Baz :: Prism' (FooBarBaz a) (Int, Char)  optics-th Generate a u for each constructor of a data type and combine them into a single class. No Isos are created. Reviews are created for constructors with existentially quantified constructors and GADTs.e.g. data FooBarBaz a = Foo Int | Bar a | Baz Int Char makeClassyPrisms ''FooBarBaz  will create class AsFooBarBaz s a | s -> a where _FooBarBaz :: Prism' s (FooBarBaz a) _Foo :: Prism' s Int _Bar :: Prism' s a _Baz :: Prism' s (Int,Char) _Foo = _FooBarBaz % _Foo _Bar = _FooBarBaz % _Bar _Baz = _FooBarBaz % _Baz instance AsFooBarBaz (FooBarBaz a) a  Generate an As class of prisms. Names are selected by prefixing the constructor name with an underscore. Constructors with multiple fields will construct Prisms to tuples of those fields. optics-thGenerate prisms for the given v optics-thType constructor name  optics-thType constructor name  optics-thgenerate top-level definitions None '(?  optics-thTracks the field class ws that have been created so far. We consult these so that we may avoid creating duplicate classes. optics-thThe optional rule to create a class and method around a monomorphic data type. If this naming convention is provided, it generates a "classy" lens. optics-th'Name to give to generated field optics. optics-th Simple top-level definition name optics-th+makeFields-style class name and method name optics-th Field Names -> Target Field Name -> Definition Names) optics-thCompute the field optics for the type identified by the given type name. Lenses will be computed when possible, Traversals otherwise.- optics-th9Build field optics as labels with a custom configuration. optics-th:Name of the data type that lenses are being generated for. optics-thNames of the class and the main method it generates, respectively. optics-th:Name of the data type that lenses are being generated for. optics-thNames of all fields (including the field being named) in the data type. optics-thName of the field being named. optics-thName(s) of the lens functions. If empty, no lens is created for that field. ('%!$#"&)*+,- ('%!$#"&)*+-,NoneG/3 optics-th'Build field optics as instances of the x- class for use with overloaded labels. See  Optics.Label for how to use this pattern.e.g. data Animal = Cat { animalAge :: Int , animalName :: String } | Dog { animalAge :: Int , animalAbsurd :: forall a b. a -> b } makeFieldLabels ''Animal  will create instance (k ~ A_Lens, a ~ Int, b ~ Int ) => LabelOptic "age" k Animal Animal a b where labelOptic = lensVL $ \f s -> case s of Cat x1 x2 -> fmap (\y -> Cat y x2) (f x1) Dog x1 x2 -> fmap (\y -> Dog y x2) (f x1) instance (k ~ An_AffineTraversal, a ~ String, b ~ String ) => LabelOptic "name" k Animal Animal a b where labelOptic = atraversalVL $ \point f s -> case s of Cat x1 x2 -> fmap (\y -> Cat x1 y) (f x2) Dog x1 x2 -> point (Dog x1 x2) instance ( Dysfunctional "absurd" k Animal Animal a b , k ~ An_AffineFold, a ~ (x -> y), b ~ (x -> y) ) => LabelOptic "absurd" k Animal Animal a b where labelOptic = afolding $ \s -> case s of Cat _ _ -> Nothing Dog _ f -> Just f which can be used as #age, #name and #absurd with the OverloadedLabels language extension.Note:6 if you wonder about the structure of instances, see Optics.Label#structure. ) = - 9 4 optics-th An alias for #makeFieldLabels noPrefixFieldLabels.5 optics-th?Derive field optics as labels, specifying explicit pairings of (fieldName, labelName).If you map multiple fields to the same label and it is present in the same constructor, i (or y- for a read only version) will be generated.e.g. 5. [("_foo", "fooLens"), ("baz", "lbaz")] ''Foo 5, [("_barX", "bar"), ("_barY", "bar")] ''Bar 6 optics-thMake field optics as labels for all records in the given declaration quote. All record syntax in the input will be stripped off.e.g. declareLenses [d| data Dog = Dog { name :: String, age :: Int } deriving Show |]  will create data Dog = Dog String Int deriving Show instance (k ~ A_Lens, ...) => LabelOptic "name" k Dog Dog ... instance (k ~ A_Lens, ...) => LabelOptic "age" k Dog Dog ... 7 optics-th Similar to 5 , but takes a declaration quote.9 optics-thRules for generation of x2 intances for use with OverloadedLabels. Same as A , but uses b.Note: if you don't want to prefix field names with the full name of the data type, you can use d instead.: optics-th Construct a  value for generating x instances using the given map from field names to definition names.; optics-thBuild field optics as top level functions with a sensible default configuration.e.g. data Animal = Cat { _age :: z , _name :: { } | Dog { _age :: z3 , _absurd :: forall a b. a -> b } ; ''Animal  will create absurd :: forall a b. AffineFold Animal (a -> b) absurd = afolding $ \s -> case s of Cat _ _ -> Nothing Dog _ x -> Just x age :: Lens' Animal Int age = lensVL $ \f s -> case s of Cat x1 x2 -> fmap (\y -> Cat y x2) (f x1) Dog x1 x2 -> fmap (\y -> Dog y x2) (f x1) name :: AffineTraversal' Animal String name = atraversalVL $ \point f s -> case s of Cat x1 x2 -> fmap (\y -> Cat x1 y) (f x2) Dog x1 x2 -> point (Dog x1 x2) ; = = A < optics-th5Derive field optics, specifying explicit pairings of (fieldName, opticName).If you map multiple fields to the same optic and it is present in the same constructor, i (or y- for a read only version) will be generated.e.g. <. [("_foo", "fooLens"), ("baz", "lbaz")] ''Foo <, [("_barX", "bar"), ("_barY", "bar")] ''Bar = optics-th/Build field optics with a custom configuration.> optics-thMake field optics for all records in the given declaration quote. All record syntax in the input will be stripped off.e.g. 3declareLenses [d| data Foo = Foo { fooX, fooY :: z } deriving | |]  will create data Foo = Foo z z deriving | fooX, fooY :: } Foo Int ? optics-th Similar to < , but takes a declaration quote.@ optics-th> with custom .A optics-thRules for making read-write field optics as top-level functions. It uses ^.B optics-th Construct a  value for generating top-level functions using the given map from field names to definition names.C optics-thMake lenses and traversals for a type, and create a class when the type has no arguments.e.g. !data Foo = Foo { _fooX, _fooY :: z } C ''Foo  will create class HasFoo c where foo :: Lens' c Foo fooX :: Lens' c Int fooY :: Lens' c Int fooX = foo % fooX fooY = foo % fooY instance HasFoo Foo where foo = lensVL id fooX = lensVL $ \f s -> case s of Foo x1 x2 -> fmap (\y -> Foo y x2) (f x1) fooY = lensVL $ \f s -> case s of Foo x1 x2 -> fmap (\y -> Foo x1 y) (f x2) C = = H D optics-thMake lenses and traversals for a type, and create a class when the type has no arguments. Works the same as C except that (a) it expects that record field names do not begin with an underscore, (b) all record fields are made into lenses, and (c) the resulting lens is prefixed with an underscore.E optics-thDerive lenses and traversals, using a named wrapper class, and specifying explicit pairings of (fieldName, traversalName).Example usage: E= "HasFoo" "foo" [("_foo", "fooLens"), ("bar", "lbar")] ''Foo F optics-thFor each record in the declaration quote, make lenses and traversals for it, and create a class when the type has no arguments. All record syntax in the input will be stripped off.e.g. 3declareClassy [d| data Foo = Foo { fooX, fooY :: z } deriving | |]  will create data Foo = Foo z z deriving | class HasFoo t where foo :: }' t Foo instance HasFoo Foo where foo = ~ fooX, fooY :: HasFoo t => } t z G optics-th Similar to E , but takes a declaration quote.H optics-th?Rules for making lenses and traversals that precompose another .I optics-thA  used by D.J optics-th?Rules for making lenses and traversals that precompose another  using a custom function for naming the class, main class method, and a mapping from field names to definition names.K optics-th$Generate overloaded field accessors.e.g data Foo a = Foo { _fooX :: z,, _fooY :: a } newtype Bar = Bar { _barX :: % } makeFields ''Foo makeFields ''Bar  will create class HasX s a | s -> a where x :: Lens' s a instance HasX (Foo a) Int where x = lensVL $ \f s -> case s of Foo x1 x2 -> fmap (\y -> Foo y x2) (f x1) class HasY s a | s -> a where y :: Lens' s a instance HasY (Foo a) a where y = lensVL $ \f s -> case s of Foo x1 x2 -> fmap (\y -> Foo x1 y) (f x2) instance HasX Bar Char where x = lensVL $ \f s -> case s of Bar x1 -> fmap (\y -> Bar y) (f x1) For details, see Z.  makeFields = = N L optics-thGenerate overloaded field accessors based on field names which are only prefixed with an underscore (e.g. _name.), not additionally with the type name (e.g. _fooName).1This might be the desired behaviour in case the DuplicateRecordFields language extension is used in order to get rid of the necessity to prefix each field name with the type name.As an example: data Foo a = Foo { _x :: z&, _y :: a } newtype Bar = Bar { _x :: 5 } makeFieldsNoPrefix ''Foo makeFieldsNoPrefix ''Bar will create classes class HasX s a | s -> a where x :: Lens' s a class HasY s a | s -> a where y :: Lens' s a together with instances instance HasX (Foo a) Int instance HasY (Foo a) a where instance HasX Bar Char where For details, see [. makeFieldsNoPrefix = = [ M optics-th  declareFields = @ NO optics-th Generate a ( for each constructor of each data type.e.g. declarePrisms [d| data Exp = Lit Int | Var String | Lambda{ bound::String, body::Exp } |]  will create data Exp = Lit Int | Var String | Lambda { bound::String, body::Exp } _Lit ::  Exp Int _Var ::  Exp String _Lambda ::  Exp (String, Exp) P optics-thGenerate "simple" optics even when type-changing optics are possible. (e.g. } instead of )Q optics-thIndicate whether or not to supply the signatures for the generated lenses.Disabling this can be useful if you want to provide a more restricted type signature or if you want to supply hand-written haddocks.R optics-th"Generate "updateable" optics when . When , (affine) folds will be generated instead of (affine) traversals and getters will be generated instead of lenses. This mode is intended to be used for types with invariants which must be maintained by "smart" constructors.S optics-thGenerate optics using lazy pattern matches. This can allow fields of an undefined value to be initialized with lenses: 8data Foo = Foo {_x :: Int, _y :: Bool} deriving Show = (A & S .~ True) ''Foo  9> undefined & x .~ 8 & y .~ True Foo {_x = 8, _y = True} The downside of this flag is that it can lead to space-leaks and code-size/compile-time increases when generated for large records. By default this flag is turned off, and strict optics are generated.When using lazy optics the strict optic can be recovered by composing with : $strictOptic = equality' % lazyOptic T optics-thCreate the class if the constructor if generated lenses would be type-preserving and the V rule matches.U optics-th}3 to access the convention for naming fields in our .V optics-th}1 to access the option for naming "classy" lenses.W optics-thField rules for fields without any prefix. Useful for generation of field labels when paired with DuplicateRecordFields language extension so that no prefixes for field names are necessary.Y optics-th#Field rules for fields in the form  _prefix_fieldname Z optics-th#Field rules for fields in the form % prefixFieldname or _prefixFieldname If you want all fields to be lensed, then there is no reason to use an _ before the prefix. If any of the record fields leads with an _' then it is assume a field without an _ should not have a lens created.Note: The prefix must be the same as the typename (with the first letter lowercased). This is a change from lens versions before lens 4.5. If you want the old behaviour, use = \[ optics-th#Field rules for fields in the form  _fieldname ( (the leading underscore is mandatory).Note: The primary difference to Z is that for classUnderscoreNoPrefixFields the field names are not expected to be prefixed with the type name. This might be the desired behaviour when the DuplicateRecordFields extension is enabled.\ optics-thField rules fields in the form % prefixFieldname or _prefixFieldname  If you want all fields to be lensed, then there is no reason to use an _? before the prefix. If any of the record fields leads with an _& then it is assume a field without an _ should not have a lens created. Note that prefix may be any string of characters that are not uppercase letters. (In particular, it may be arbitrary string of lowercase letters and numbers) This is the behavior that N had in lens 4.4 and earlier.] optics-thA  that leaves the field name as-is. Useful for generation of field labels when paired with DuplicateRecordFields language extension so that no prefixes for field names are necessary.^ optics-thA  that strips the _ off of the field name, lowercases the name, and skips the field if it doesn't start with an '_'._ optics-th Create a  from explicit pairings of (fieldName, lensName).` optics-th Create a 3 from a mapping function. If the function returns []#, it creates no lens for the field.a optics-thA  for Y.b optics-thA  for Z.c optics-thA  for [.d optics-thA  for \.: optics-th (Field name, Label name)B optics-th (Field name, Optic name)J optics-th-Type Name -> Maybe (Class Name, Method Name)  optics-th (Field Name, Method Name)` optics-thA function that maps a  fieldName to lensNames.<-3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd<345-6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd      !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ststpststpppppp$optics-th-0.4-CH46YwIbNdF2jsJMhbR07GOptics.TH.Internal.UtilsOptics.TH.Internal.SumOptics.TH.Internal.Product Optics.TH#Language.Haskell.TH.Optics.InternalControl.Lens.TypePrismappsTappsE1toTupleTtoTupleEtoTuplePconAppsTnewNameseqSubst addKindInfo addKindInfo' quantifyType quantifyType'tyVarBndrToTyperequireExtensionsrequireExtensionsForLabelsrequireExtensionsForFields inlinePragma makePrismsmakeClassyPrismsmakePrismLabels makeDecPrisms$fHasTypeVarsNCon$fEqNCon $fShowNCon $fEqOpticTypeHasFieldClasses ClassyNamerDefNameTopName MethodName FieldNamer LensRules _simpleLenses _generateSigs_generateClasses _allowIsos _allowUpdates _lazyPatterns _fieldToDef _classyLensesmakeFieldOpticsmakeFieldOpticsForDecmakeFieldOpticsForDec'makeFieldLabelsForDecmakeFieldLabelsWith $fShowDefName $fEqDefName $fOrdDefName$fShowOpticStab$fShowOpticTypemakeFieldLabelsmakeFieldLabelsNoPrefixmakeFieldLabelsFordeclareFieldLabelsdeclareFieldLabelsFordeclareFieldLabelsWithfieldLabelsRulesfieldLabelsRulesFor makeLenses makeLensesFormakeLensesWith declareLensesdeclareLensesFordeclareLensesWith lensRules lensRulesFor makeClassy makeClassy_ makeClassyFor declareClassydeclareClassyFor classyRules classyRules_classyRulesFor makeFieldsmakeFieldsNoPrefix declareFieldsdefaultFieldRules declarePrisms simpleLensesgenerateSignaturesgenerateUpdateableOpticsgenerateLazyPatterns createClass lensField lensClassnoPrefixFieldLabelsabbreviatedFieldLabelsunderscoreFieldscamelCaseFieldsclassUnderscoreNoPrefixFieldsabbreviatedFields noPrefixNamerunderscoreNoPrefixNamerlookingupNamer mappingNamerunderscoreNamercamelCaseNamerclassUnderscoreNoPrefixNamerabbreviatedNamer SubstType substType HasTypeVars typeVarsEx&optics-core-0.4-LvtBa7lrhQQ5XGfQmCGebVOptics.Traversal Traversaltemplate-haskellLanguage.Haskell.TH.SyntaxnewNametypeVarstypeVarsKinded substTypeVars-th-abstraction-0.4.2.0-CPMLTlyMgmr6dbHxHL95CG&Language.Haskell.TH.Datatype.TyVarBndr TyVarBndrSpec_FamilyI_ClosedTypeFamilyD_OpenTypeFamilyD_ForallT TyVarBndrType Optics.PrismDecName Optics.Label LabelOptic Optics.FoldFoldghc-prim GHC.TypesIntbaseGHC.BaseStringGHC.ShowShow Optics.LensLens'idLensCharPrism'TrueFalse equality'