úÎ9î6K8      !"#$%&'()*+,-./01234567None 09:;<=?T:A concrete type used to mark type which have been expanded *The state type used to memoize expansions. *Apply the th-desugar expand function to a 8 and mark it as expanded. *Apply the th-desugar expand function to a 97 and mark it as expanded. Note that the definition of 9& changed in template-haskell-2.10.0.0. Expand a list of 8 and build an expanded ClassP 9.  :;      :;None 9:;<=DR6Helper function to interpret a type application: vunfoldApply (AppT (AppT (AppT (VarT (mkName "a")) StarT) ListT) ArrowT) -> (VarT (mkName "a"), [StarT, ListT, ArrowT]) The inverse is uncurry . foldl AppT.<eCreate a new variable binding, making sure all bound variables in are expanded in the resulting map.=><? !"#$%&=><? !"#$%&None /09:;<=T *NDid we get this instance from the Q monad or does it still need to be spliced?+#An instance we found in the Q monad,(An instance we inserted via tellInstance.Combine the DsMonad (desugaring), which includes the Q monad, and state to record declared instances, type expansions, and a string for debugging messages.0Like @Z, looks up all the instances that match the given class name and argument types. Unlike @ÿ, only the ones that satisfy all the instance context predicates in the environment are returned. If there is already an instance that satisfies the predicate built from the name and types it is returned. If not, this new predicate is inserted into the state monad /j, associated with an empty list of predicates, and the empty list is returned. Later the caller can use 1, to associate instances with the predicate.AÿTest one of the instances returned by qReifyInstances against the context we have computed so far. We have already added a ClassP predicate for the class and argument types, we now need to unify those with the type returned by the instance and generate some EqualP predicates.BÿNow we have predicates representing the unification of the type parameters with the instance type, along with the instance superclasses. Are they consistent? Find out using type synonym expansion, variable substitution, elimination of vacuous predicates, and unification.C'Decide whether a predicate returned by D¦ is consistent with the accumulated context. Use recursive calls to reifyInstancesWithContext when we encounter a class name applied to a list of type parameters.1íDeclare an instance in the state monad, marked Undeclared. After this, the instance predicate (constructed from class name and type parameters) will be considered part of the context for subsequent calls to reifyInstancesWithContext.2ïAfter all the declared and undeclared instances have been added to the instance map using tellInstance, this returns the undeclared instances only, not the ones that were discovered by reifyInstances, and tells them to the writer monad.EWTurn a type Name and a list of Type parameters into a Pred (which is now just a Type.)FnThe inverse of foldInstance. Returns Nothing if the Pred is incorrectly formatted - i.e. not in a form that E can produce.*+,-./0ABC12EF3456 *+,-./0123 /.*+,--0123*+,--./0ABC12EF3456G      !"#$%&'()*+,-./0123456789:;<=;<>?@ABBC;<DEFGHIJKLM&th-context-0.24-IAK7Vso0nCF9BqhFcQoPbpLanguage.Haskell.TH.ExpandData.Logic.ATP.THLanguage.Haskell.TH.ContextE_unE$fLiftE$fPprE$fEqE$fOrdE$fShowE$fDataE ExpandMapunE expandType expandPred expandClassPpprint1 unfoldApplyexpandBindings $fUnifym[] $fUnifymType$fIsPropositionalContext$fIsLiteralContext$fIsFormulaContext$fHasFixityContext$fJustLiteralType$fIsLiteralType$fIsFormulaType$fHasEquateType$fHasApplyType $fIsTermType$fIsPredicateType$fIsFunctionType$fIsVariableType$fIsStringContext$fIsStringType$fIsAtomContext $fIsAtomType$fPrettyContext $fPrettyType$fHasFixityType $fEqContext $fOrdContext $fShowContext DecStatusDeclared Undeclared instanceDecContextMInstMapreifyInstancesWithContext tellInstancetellUndeclared noInstance$fPprDecStatus$fContextMWriterT$fContextMReaderT$fShowDecStatustemplate-haskellLanguage.Haskell.TH.SyntaxTypePred pprintStyle friendlyNamesbindContext expandBindingqReifyInstances testInstance testContext consistent'atp-haskell-1.14-KRwviggYl14C2bUYUGSrhvData.Logic.ATP.Unifunify foldInstanceunfoldInstance