}?@ABCDEFGHIJKLMNOPQR S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m None 34579N*The state type used to memoize expansions.:A concrete type used to mark type which have been expanded*Apply the th-desugar expand function to a n and mark it as expanded.*Apply the th-desugar expand function to a o7 and mark it as expanded. Note that the definition of o& changed in template-haskell-2.10.0.0.Expand a list of n and build an expanded ClassP o. pqpqNone 3457FNr{Does the type or the declaration to which it refers contain a primitive (aka unlifted) type? This will traverse down any s: to the named types, and then check whether any of their t records are u values. Pretty print a vk value on a single line with each block of white space (newlines, tabs, etc.) converted to a single space.$Return a key's list of adjacent keys%Return a key's list of reachable keysr wxyz{|}~     r wxyz{|}~None345NLThis is based on the freeNamesOfTypes function from the th-desugar package.Return the names of the type variables that are free in x. I.e., type variables that appear in the type expression but are not bound by an enclosing forall or by the type parameters of a Dec.1Update the free variable set for a type parameter Extract a  from a None+35Given the list of constructors from a Dec, dispatch on the different levels of complexity of the type they represent - a wrapper is a single arity one constructor, an enum is several arity zero constructors, and so on.   None35EFor simple type graphs where no parent field information is required. .All the type synonyms that expand to this type!The fully expanded type"A vertex of the type graph. Includes a type and (optionally) what field of a parent type holds that type. This allows special treatment of a type depending on the type that contains it.$)The record field which contains this type)Return the set of y of a type's synonyms, plus the name (if any) used in its data declaration. Note that this might return the empty set. !"#$%&'()*+, !"#$%&'()*+,()*"#$%&' !,+  !"#$%&'()*+,None!"+3457FIN -OInformation collected about the graph implied by the structure of one or more n values.DThe kernel of types from which the others in _typeSet are discoveredAAll the types encountered, including embedded types such as the  and the  in  Maybe Int.(The Info record of all known named types-Map of the expansion of all encountered types@The types with all type synonyms replaced with their expansions."Map from field type to field namesCollect the graph information for one type and all the types reachable from it. The extraTypes function parameter allows extra edges to be added to the graph other than those implied by the Type structure.35Build a TypeInfo value by scanning the supplied types5Find the vertices that involve a particular type - if the field is specified it return s singleton, otherwise it returns a set containing a vertex one for the type on its own, and one for each field containing that type.6Build a vertex from the given n and optional . vertex :: forall m. (DsMonad m, MonadReaders TypeInfo m) => Maybe Field -> E Type -> m TypeGraphVertex vertex fld etyp = maybe (typeVertex etyp) (fieldVertex etyp) fldBuild a non-field vertex8&Build a vertex associated with a field-./012345678 -./012345678 -0./12367854-./012345678None!"+3457FIN :Given the discovered set of types and maps of type synonyms and fields, build and return the GraphEdges relation on TypeGraphVertex. This is not a recursive function, it stops when it reaches the field types.;!Isolate and remove matching nodes<Monadic predicate version of ;.?2Remove all the in- and out-edges of matching nodes@Monadic predicate version of ?.A%Replace the out set of selected nodesCTRemove matching nodes and extend each of their in-edges to each of their out-edges.DMonadic predicate version of C.ESimplify a graph by throwing away the field information in each node. This means the nodes only contain the fully expanded Type value (and any type synonyms.)9:;<=>?@ABCDE 9:;<=>?@ABCDE 9:;<=>?@ABCDE9:;<=>?@ABCDENone &+3457INHThe information required to extact a field value from a value. We keep a stack of these as we traverse a declaration. Generally, we only need the field names.N%Push the stack and process the field.PfReturn a lambda function that turns a value of Type typ0 into the type implied by the stack elements.EReturn an expression of a lens for the value described by the stack.LGenerate a lens to access a field, as represented by the StackElement type.QFGiven a field name, return the name to use for the corresponding lens.FGHIJKLMNOPQ FGHIJKLMNOPQ HIMNGFOJKPLQFGHIJKLMNOPQ None3457>FLN SBuild a graph from the result of typeGraphEdges, each edge goes from a type to one of the types it contains. Thus, each edge represents a primitive lens, and each path in the graph is a composition of lenses.TwWhen a VertexStatus value is associated with a Type it describes alterations in the type graph from the usual default.U normal caseV1out degree zero - don't create any outgoing edgesW<replace all outgoing edges with an edge to an alternate typeX,add an extra outgoing edge to the given type_kLenses represent steps in a path, but the start point is a type vertex and the endpoint is a field vertex.`Paths go between simple types.c;Can we reach the goal type from the start type in this key?fKReturn the TGV associated with a particular type, with no field specified.g;Return the TGV associated with a particular type and field.hReturn the set of edges implied by the subtype relationship among a set of types. This is just the nodes of the type graph. The type aliases are expanded by the th-desugar package to make them suitable for use as map keys.iReturn the set of adjacent vertices according to the default type graph - i.e. the one determined only by the type definitions, not by any additional hinting function.$RSTUVWXYZ[\]^_`abcdefgh#This function is applied to every expanded type before use, and the result is used instead. If it returns NoVertex, no vertices or edges are added to the graph. If it returns Sink no outgoing edges are added. The current use case Substitute is to see if there is an instance of class View a b where a is the type passed to doType, and replace it with b , and use the lens returned by View's method to convert between a and b0 (i.e. to implement the edge in the type graph.)ijRSTUVWXYZ[\]^_`abcdefghijR]YZ[\S_`^abcdejTUVWXhifgRSTUVWXYZ[\]^_`abcdefghij None &+3457INkGenerate lenses to access the fields of the row types. Like Control.Lens.TH.makeLenses, but makes lenses for every field, and instead of removing the prefix '_' to form the lens name it adds the prefix "lens" and capitalizes the first letter of the field. The only reason for this function is backwards compatibility, makeLensesFor should be used instead.l.Build the list of pairs used by makeLensesFor.klklklkl NonemCompute the arity of a type - the number of type parameters that must be applied to it in order to obtain a concrete type. I'm not quite sure I understand the relationship between this and  freeTypeVars.mmmm    !"#$%&'(()*++,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPPQRSTUVWX Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s tuvwuvxyz{uv|uv}uv~uuvuv5 Y thtyp_FfQTF1vsuAs0eRVl2Ku8Kv$Language.Haskell.TH.TypeGraph.Expand%Language.Haskell.TH.TypeGraph.Prelude"Language.Haskell.TH.TypeGraph.Free#Language.Haskell.TH.TypeGraph.Shape$Language.Haskell.TH.TypeGraph.Vertex&Language.Haskell.TH.TypeGraph.TypeInfo#Language.Haskell.TH.TypeGraph.Edges#Language.Haskell.TH.TypeGraph.Stack'Language.Haskell.TH.TypeGraph.TypeGraph"Language.Haskell.TH.TypeGraph.Lens#Language.Haskell.TH.TypeGraph.Arity ExpandMapEunE expandType expandPred expandClassPunliftedLpprint'constructorNamedeclarationNamedeclarationTypeunReify unReifyName adjacent' reachable' freeTypeVars FieldType PositionalNamedFieldconstructorFields fieldTypefPosfNamefType foldShapeconstructorFieldTypes TGVSimple_syns_etypeTGV_field_vsimplefieldvsimpleTypeGraphVertex typeNamesbestTypeetypesynsTypeInfofieldsinfoMap startTypessynonymstypeSet makeTypeInfo allVertices fieldVertices typeVertex typeVertex' fieldVertex GraphEdgestypeGraphEdgescutcutMcutEdges cutEdgesMisolateisolateMlinklinkMdissolve dissolveM simpleEdgesStackTHasStack StackElement withStackpush traceIndented prettyStack foldField execStackT stackAccessor lensNamer TypeGraph graphFromMap VertexStatusVertexSinkDivertExtraedgesgraphgsimplestacktypeInfo allPathStarts allLensKeys allPathKeys reachableFromreachableFromSimplegoalReachableFullgoalReachableSimplegoalReachableSimple'typeGraphVertextypeGraphVertexOfFieldtypeGraphEdges'adjacent makeTypeGraphmakeTypeGraphLenses lensNamePairs typeAritytemplate-haskellLanguage.Haskell.TH.SyntaxTypePred$fLiftE$fPprE IsUnliftedDecInfo PrimTyConILanguage.Haskell.TH.PprPpr $fLiftMap $fLiftSet$fIsUnliftedInfo$fIsUnliftedType$fIsUnliftedCon$fIsUnliftedDec$fPprL$fPpr() FreeTypeVarsgo_paramtvbNameName TyVarBndrSt_result_visitedst0ftvresultvisitedgo_appgo_infogo_dec go_params$fFreeTypeVars(,,)$fFreeTypeVars(,)$fFreeTypeVarsCon$fFreeTypeVarsType$fFreeTypeVars[]$fPprFieldType$fPpr(,) $fPpr(,)0 $fPpr(,,)$fTypeGraphVertexTGVSimple$fTypeGraphVertexTGV$fLiftTGVSimple $fLiftTGV$fPprTGV$fPprTGVSimple _startTypes_typeSetbaseGHC.BaseMaybeghc-prim GHC.TypesInt_infoMap _expanded _synonyms_fieldscollectTypeInfo $fPprTypeInfoexpanded$fLiftTypeInfo$fMonadStatesMapStateT$fPprMap stackLens fieldLens stackTypenthLens _typeInfo_edges_graph_gsimple_stack$fPprIntview' isReachable$fDefaultVertexStatus$fMonadReaders[]ReaderTnamer