!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None 9:;<=LT :Perform a fold over the Type and Info values embedded in tPretty print a  value on a single line with each block of white space (newlines, tabs, etc.) converted to a single space, and all the module qualifiers removed from the names. (If the data type has no 2 values the friendlyNames function has no effect.)/Pretty print with friendly names and wide lines-Pretty print with friendly names in left mode#Helper function for pprint1 et. al.JMake a template haskell value more human reader friendly. The result almost certainly won't be compilable. That's ok, though, because the input is usually uncompilable - it imports hidden modules, uses infix operators in invalid positions, puts module qualifiers in places where they are not allowed, and maybe other things.{Does the type or the declaration to which it refers contain a primitive (aka unlifted) type? This will traverse down any : to the named types, and then check whether any of their  records are  values. $Return a key's list of adjacent keys %Return a key's list of reachable keys    None09;Given 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.!GBuild a pattern that will match only values with the given constructor. !"#$%  !  ! !"#$%None09;,EFor simple type graphs where no parent field information is required...All the type synonyms that expand to this type/The fully expanded type0A 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.2)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. *+,-./0123<=>?@ABCDEFGHIJKLMNOPQ*+,-./0123<=>?@ABC>?@0123<=*,-./BA+C*+,-./0123<=>?@ABCDEFGHIJKLMNOPQNone%&09:;<=LOT ROInformation collected about the graph implied by the structure of one or more  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.\5Build a TypeInfo value by scanning the supplied types^Find 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._Build a vertex from the given  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 vertexa&Build a vertex associated with a fieldRSWXYZ[\]^_`abc RWXYZ[\]^_`a RYWXZ[\_`a^]RSWXYZ[\]^_`abcNone *09:;<=OTdUA stack describes a path from a top type down through fields of its component types.hThe 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.u'push an element onto the TypeStack in mx%Push the stack and process the field.zfReturn 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.{FGiven a field name, return the name to use for the corresponding lens.defghipqrstuvwxyz{|defghipqrstuvwxyz{defgrshiwxqpytuzv{defghipqrstuvwxyz{|None9:;TLThis 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%&09:;<=LOT 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 nodesMonadic predicate version of .2Remove all the in- and out-edges of matching nodesMonadic predicate version of .%Replace the out set of selected nodesTRemove matching nodes and extend each of their in-edges to each of their out-edges.Monadic predicate version of .Simplify 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.) None!"9:;<=DLRTCBuild a TypeGraph given a set of edges and the TypeInfo environmentBuild 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.wWhen a VertexStatus value is associated with a Type it describes alterations in the type graph from the usual default. normal case1out degree zero - don't create any outgoing edges<replace all outgoing edges with an edge to an alternate type,add an extra outgoing edge to the given type`All the nodes in the TGV (unsimplified) graph, where each field of a record is a distinct node.TAll the nodes in the TGVSimple graph, where each field representa a different type.Each lens represents a single step in a path. The start point is a simplified vertex and the endpoint is an unsimplified vertex.NFind the node corresponding to the given simple graph node in the full graph.:Find the simple graph node corresponding to the given type1Return the nodes adjacent to x in the lens graph.Paths go between simple types.4Return the nodes reachable from x in the path graph.4Return the nodes reachable from x in the path graph.;Can we reach the goal type from the start type in this key?3Can we reach the goal type in the simplified graph?GVersion of goalReachableSimple that first simplifies its argument nodesKReturn the TGV associated with a particular type, with no field specified.;Return the TGV associated with a particular type and field.0!!& None *09:;<=OTGenerate 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..Build the list of pairs used by makeLensesFor. NoneCompute 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.    !"#$%&'()*+,-./012345667899:;<=>?@ABCDEFGHIJKLMNOPQRS/T-.UVWXYZ[\]^_`abcdefghiijkllmnopqrstuvwxyz{|}~/T W *th-typegraph-0.35.1-LfXabl7R2PgHdd9cAuRCIh%Language.Haskell.TH.TypeGraph.Prelude#Language.Haskell.TH.TypeGraph.Shape$Language.Haskell.TH.TypeGraph.Vertex&Language.Haskell.TH.TypeGraph.TypeInfo#Language.Haskell.TH.TypeGraph.Stack"Language.Haskell.TH.TypeGraph.Free#Language.Haskell.TH.TypeGraph.Edges'Language.Haskell.TH.TypeGraph.TypeGraph"Language.Haskell.TH.TypeGraph.Lens#Language.Haskell.TH.TypeGraph.Arity OverTypes overTypespprint1pprintWpprintL friendlyNamesunliftedconstructorNamedeclarationNamedeclarationTypeunReify unReifyName adjacent' reachable'$fOverTypesInfo$fOverTypesType$fOverTypesCon$fOverTypes(,,)$fOverTypes(,)$fOverTypesDec$fPpr() FieldType PositionalNamedField fieldTypefPosfNamefType foldShapeconstructorFieldTypesconstructorFieldsconstructorPat$fPprFieldType$fPpr(,) $fPpr(,)0 $fPpr(,,) $fEqFieldType$fOrdFieldType$fShowFieldType$fDataFieldTypeTGV TGVSimple TGVSimple'_syns_etypeTGV'_field_vsimple$fEqTGVSimple'$fOrdTGVSimple'$fShowTGVSimple'$fDataTGVSimple'$fEqTGV' $fOrdTGV' $fShowTGV' $fDataTGV'fieldvsimpleTypeGraphVertex typeNamesbestTypeetypesyns bestTypeQ$fTypeGraphVertex(,)$fTypeGraphVertex(,)0$fTypeGraphVertexTGVSimple'$fTypeGraphVertexTGV'$fLiftTGVSimple' $fLiftTGV'$fPprMap $fPprMap0 $fPpr(,,)0 $fPprTGV'$fPprTGVSimple'TypeInfo $fPprTypeInfo$fShowTypeInfo $fEqTypeInfo $fOrdTypeInfofieldsinfoMap startTypessynonymstypeSet makeTypeInfo allVertices fieldVertices typeVertex typeVertex' fieldVertex$fLiftTypeInfo$fMonadStatesMapStateT TypeStack_topType _typeStack StackElement$fEqStackElement$fShowStackElement$fDataStackElement $fEqTypeStack$fShowTypeStack$fDataTypeStackStackTHasStacktopType typeStack withStackpush traceIndented prettyStack foldField execStackT stackAccessor lensNamer$fMonadReadersTypeInfoReaderT$fShowSt freeTypeVars$fFreeTypeVars(,,)$fFreeTypeVars(,)$fFreeTypeVarsCon$fFreeTypeVarsType$fFreeTypeVars[] GraphEdgestypeGraphEdgescutcutMcutEdges cutEdgesMisolateisolateMlinklinkMdissolve dissolveM simpleEdges TypeGraph makeTypeGraph graphFromMap VertexStatusVertexSinkDivertExtra HasTGVSimple asTGVSimpleHasTGVasTGVgraphgsimplestack allPathNodes allPathStarts allLensKeystgv tgvSimple tgvSimple'lensKeyssimplify allPathKeyspathKeys pathKeys' reachableFromreachableFromSimplegoalReachableFullgoalReachableSimplegoalReachableSimple'typeGraphVertextypeGraphVertexOfField$fDefaultVertexStatus$fHasTGVSimple(,) $fHasTGV(,)$fPprInt$fPprTypeGraph$fMonadReaders[]ReaderT$fShowVertexStatusmakeTypeGraphLenses lensNamePairs typeAritytemplate-haskellLanguage.Haskell.TH.PprPprLanguage.Haskell.TH.SyntaxName pprintStyleDecInfo PrimTyConIType _startTypes_typeSetbaseGHC.BaseMaybeghc-prim GHC.TypesInt_infoMap _expanded _synonyms_fieldscollectTypeInfoexpanded stackLens fieldLens stackTypenthLens FreeTypeVarsgo_paramtvbName TyVarBndrSt_result_visitedst0ftvresultvisitedgo_appgo_infogo_dec go_params_graph_gsimple_stackview' isReachablenamer