_}t      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s None 3457FNt{Does the type or the declaration to which it refers contain a primitive (aka unlifted) type? This will traverse down any u: to the named types, and then check whether any of their v records are w values.Pretty print a xk 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 keyst yz{|}~   t yz{|}~None345NLThis is based on the freeNamesOfTypes function from the th-desugar package.Compute 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 .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 34579N@A concrete type for which Expanded instances are declared below.{This class lets us use the same expand* functions to work with specially marked expanded types or with the original types.*Apply the th-desugar expand function to a  and mark it as expanded.*Apply the th-desugar expand function to a 7 and mark it as expanded. Note that the definition of & changed in template-haskell-2.10.0.0.Expand a list of  and build an expanded ClassP .!Unsafely mark a value as expanded Strip mark off an expanded value  None+35"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. !"#  !"# # !"  !"#None35$EFor 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.$%&'()*+,-./012$%&'()*+,-./012./0()*+,-$%&'21 $%&'()*+,-./012None!"+3457FIN 3OInformation 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 namesPCollect the graph information for one type and all the types reachable from it.95Build 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, MonadReader TypeInfo m) => Maybe Field -> E Type -> m TypeGraphVertex vertex fld etyp = maybe (typeVertex etyp) (fieldVertex etyp) fldBuild a non-field vertex>&Build a vertex associated with a field3456789:;<=> 3456789:;<=> 3645789<=>;:3456789:;<=> None7None!"+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.A!Isolate and remove matching nodesBMonadic predicate version of A.E2Remove all the in- and out-edges of matching nodesFMonadic predicate version of E.G%Replace the out set of selected nodesITRemove matching nodes and extend each of their in-edges to each of their out-edges.JMonadic predicate version of I.KSimplify 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.)?@ABCDEFGHIJK ?@ABCDEFGHIJK ?@ABCDEFGHIJK?@ABCDEFGHIJKNone +3457INQThe 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.W%Push the stack and process the field.Y9Re-implementation of stack accessor in terms of stackLensEReturn 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.ZGenerate 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, the fields should be changed so they begin with _ and the regular makeLenses should be used.FGiven a field name, return the name to use for the corresponding lens.LMNOPQRSTUVWXYZLMNOPQRSTUVWXYZNOPLMTQRVWSXYZULMNOPQRSTUVWXYZ None345>FLN \Build 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 case_1out degree zero - don't create any outgoing edges`<replace all outgoing edges with an edge to an alternate typea,add an extra outgoing edge to the given typehkLenses represent steps in a path, but the start point is a type vertex and the endpoint is a field vertex.iPaths go between simple types.l;Can we reach the goal type from the start type in this key?oKReturn the TGV associated with a particular type, with no field specified.p;Return the TGV associated with a particular type and field.qReturn 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.rReturn 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.#[\]^_`abcdefghijklmnopq#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.)rs[\]^_`abcdefghijklmnopqrs[fbcde\higjklmns]^_`aqrop[\]^_`abcdefghijklmnopqrs    !"#$%&'()*+,--./00123456789:;<=>?@ABCDEFGHIJKLMNOPQRSSTUVWWXYZ[\]^_ ` a b c d e f g h i j k l m n o p q r s t u v w xyz{|z{}z{~zz{z{jz{z{:  ` thtyp_Be4i0R9P0o6EhvUjzaCI67%Language.Haskell.TH.TypeGraph.Prelude"Language.Haskell.TH.TypeGraph.Free$Language.Haskell.TH.TypeGraph.Expand#Language.Haskell.TH.TypeGraph.Shape$Language.Haskell.TH.TypeGraph.Vertex"Language.Haskell.TH.TypeGraph.Info#Language.Haskell.TH.TypeGraph.Edges#Language.Haskell.TH.TypeGraph.Stack#Language.Haskell.TH.TypeGraph.Graph$Language.Haskell.TH.TypeGraph.UnsafeHasSetgetSet modifySetunliftedLpprint'constructorNamedeclarationNamedeclarationTypeunReify unReifyName adjacent' reachable' typeArity freeTypeVarsEExpanded markExpanded runExpanded' expandType expandPred expandClassP runExpanded FieldType PositionalNamedFieldconstructorFields fieldTypefPosfNamefType foldShapeconstructorFieldTypes TGVSimple_syns_etypeTGV_field_vsimplefieldvsimpleTypeGraphVertex typeNamesbestTypeetypesynsTypeInfofieldsinfoMap startTypessynonymstypeSet makeTypeInfo allVertices fieldVertices typeVertex typeVertex' fieldVertex GraphEdgestypeGraphEdgescutcutMcutEdges cutEdgesMisolateisolateMlinklinkMdissolve dissolveM simpleEdgesWrapperHasStack withStackpush StackElementStackTunwrap traceIndented prettyStack foldField execStackT stackAccessor makeLenses' TypeGraph graphFromMap VertexStatusVertexSinkDivertExtraedgesgraphgsimplestacktypeInfo allPathStarts allLensKeys allPathKeys reachableFromreachableFromSimplegoalReachableFullgoalReachableSimplegoalReachableSimple'typeGraphVertextypeGraphVertexOfFieldtypeGraphEdges'adjacent makeTypeGraph IsUnliftedtemplate-haskellLanguage.Haskell.TH.SyntaxDecInfo PrimTyConILanguage.Haskell.TH.PprPpr $fLiftMap $fLiftSet$fIsUnliftedInfo$fIsUnliftedType$fIsUnliftedCon$fIsUnliftedDec$fPprL$fPpr() FreeTypeVarsgo_paramtvbNameName TyVarBndrSt_result_stackst0ftvresultgo_appgo_infogo_dec go_params$fFreeTypeVars(,,)$fFreeTypeVars(,)$fFreeTypeVarsCon$fFreeTypeVarsType$fFreeTypeVars[]TypePred$fMemoizableType$fMemoizableName$fMemoizableTyLit$fMemoizableNameFlavour$fMemoizableOccName$fMemoizableNameSpace$fMemoizableTyVarBndr$fMemoizableModName$fLiftE$fPprE$fExpandedTypeE$fMemoizablePkgName$fPprFieldType$fPpr(,) $fPpr(,)0 $fPpr(,,)$fTypeGraphVertexTGVSimple$fTypeGraphVertexTGV$fLiftTGVSimple $fLiftTGV$fPprTGV$fPprTGVSimple _startTypes_typeSetbaseGHC.BaseMaybeghc-prim GHC.TypesInt_infoMap _expanded _synonyms_fieldscollectTypeInfo $fPprTypeInfoexpanded$fLiftTypeInfo$fExpandedTypeType$fPprMap stackLens fieldLens lensNamer_unwrap$fHasStackReaderT$fHasStackReaderT0$fHasStackStateT$fHasStackRWST stackTypenthLens$fHasStackWriterT _typeInfo_edges_graph_gsimple$fPprInt isReachable$fDefaultVertexStatus