h*JB      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0.13.0.0 Safe-Inferred%&')*-11ghc-tcplugin-apiUse this type like  to write an error message. This error message can then be thrown at the type-level by the plugin, by emitting a wanted constraint whose predicate is obtained from .A  will still need to be provided in order to inform GHC of the origin of the error (e.g.: which part of the source code should be highlighted?). See .ghc-tcplugin-apiShow the text as is.ghc-tcplugin-apiPretty print the given type.ghc-tcplugin-apiPut two messages side by side.ghc-tcplugin-apiStack two messages vertically.ghc-tcplugin-apiMonads for type-checking plugins which are able to emit new constraints and throw errors.2These operations are supported by the monads that  and ? use; it is not possible to emit work or throw type errors in  or .See  and - for functions which require this typeclass.ghc-tcplugin-apiA * is essentially a reader monad over GHC's    monad.This means we have both a lift and an unlift operation, similar to  MonadUnliftIO or MonadBaseControl.See for instance , which is an example of function that one would not be able to write using only a lift operation.Note that you must import the internal module in order to access the methods. Please report a bug if you find yourself needing this functionality.ghc-tcplugin-apiLift a computation from GHC's  monad.ghc-tcplugin-apiLift a computation from the    monad.ghc-tcplugin-apiUnlift a computation from the    monad.If this type signature seems confusing, I recommend reading Alexis King's excellent blog post on MonadBaseControl: https://lexi-lambda.github.io/blog/2019/09/07/demystifying-monadbasecontrol/Demystifying MonadBaseControlghc-tcplugin-api?The monad used for a type-checker plugin, parametrised by the  of the plugin.ghc-tcplugin-apiA record containing all the stages necessary for the operation of a type-checking plugin, as defined in this API.Note1: this is not the same record as GHC's built-in    record. Use  for the conversion.To create a type-checking plugin, define something of this type and then call  on the result. This will return something that can be passed to  : plugin :: GHC.Plugins.Plugin plugin = GHC.Plugins.defaultPlugin { GHC.Plugins.tcPlugin = \ args -> Just $ GHC.TcPlugin.API.mkTcPlugin ( myTcPlugin args ) } myTcPlugin :: [String] -> GHC.TcPlugin.API.TcPlugin myTcPlugin args = ...ghc-tcplugin-api.Initialise plugin, when entering type-checker.ghc-tcplugin-apiSolve some constraints.This function will be invoked at two points in the constraint solving process: once to manipulate given constraints, and once to solve wanted constraints. In the first case (and only in the first case), no wanted constraints will be passed to the plugin.The plugin can either return a contradiction, or specify that it has solved some constraints (with evidence), and possibly emit additional wanted constraints.Use $ \ _ _ _ -> pure $ TcPluginOK [] [] 5 if your plugin does not provide this functionality.ghc-tcplugin-api+Rewrite saturated type family applications.The plugin is expected to supply a mapping from type family names to rewriting functions. For each type family , the plugin should provide a function which takes in the given constraints and arguments of a saturated type family application, and return a possible rewriting. See + for the expected shape of such a function.Use  const emptyUFM 4 if your plugin does not provide this functionality.ghc-tcplugin-api9Clean up after the plugin, when exiting the type-checker.ghc-tcplugin-apiFor rewriting type family applications, a type-checking plugin provides a function of this type for each type family .The function is provided with the current set of Given constraints, together with the arguments to the type family. The type family application will always be fully saturated.ghc-tcplugin-apiThe solve function of a type-checking plugin takes in Given and Wanted constraints, and should return a  indicating which Wanted constraints it could solve, or whether any are insoluble.ghc-tcplugin-api5Stage of a type-checking plugin, used as a data kind.ghc-tcplugin-apiOnly available in the solver part of the type-checking plugin.ghc-tcplugin-apiAsk for the Derived constraints that the solver was provided with.2Always returns the empty list on GHC 9.4 or above.ghc-tcplugin-api*Ask for the current rewriting environment.Only available in the rewriter part of the type-checking plugin.ghc-tcplugin-apiTake a function whose argument and result types are both within the    monad, and return a function that works within a type-checking plugin monad.Please report a bug if you find yourself needing to use this function.ghc-tcplugin-apiUse this function to create a type-checker plugin to pass to GHC.ghc-tcplugin-api4Create an error type with the desired error message. The result can be paired with a 8 in order to throw a type error, for instance by using .ghc-tcplugin-apiGivensghc-tcplugin-api!Type family arguments (saturated)ghc-tcplugin-apiGivensghc-tcplugin-apiWantedsghc-tcplugin-api.type-checking plugin written with this libraryghc-tcplugin-apitype-checking plugin for GHC++56 Safe-Inferred 12R ghc-tcplugin-apiRun an  computation within the plugin.ghc-tcplugin-api4Output some debugging information within the plugin.ghc-tcplugin-api'Get package name from package qualifierghc-tcplugin-apiResolve importghc-tcplugin-api?@AB="YZC!wxyX($' &\]^_J /0.-1278 9EFGHIDz{|}~KuWUTVPStLv`akM#opqr[QRlOsNmndebc)fgh%ji3456*+, :;<>?@AB="YZC!wxyX($' &\]^_J /0.-12 Safe-Inferred/013Ba ghc-tcplugin-api)Type-class dispatch for looking up names.Every instance is of the form: 4ResolveName (Wear Named thing) (Wear Resolved thing)which allows one to write : resolveName :: ... => Wear Named thing -> m ( Wear Resolved thing )ghc-tcplugin-apiThis class exposes the method  which will perform name resolution for all the fields in a datatype.Example usage: we define a record that will hold the things we want to look up, using the  type family. For example: data MyData n = MyData { myClass :: !( Wear n Class ) , myTyCon :: !( Wear n TyCon ) , myDataCon :: !( Wear n DataCon ) , myPromDataCon :: !( Wear n (Promoted DataCon) ) } deriving stock Generic deriving ResolveNames via Generically1 MyDataNow we can specify the names of the things which we want to look up, together with the modules and packages in which they belong: myNames :: MyData Named myNames = MyData { myClass = QualifiedName "MyClass" "My.Module" ( Just "my-pkg-name" ) , ... }Then we can call : resolvedNames :: MonadTcPlugin m => m (MyData Resolved) resolvedNames = resolveNames myNamesThis returns a record containing the looked up things we want, e.g. myClass :: Class, myPromDataCon :: TyCon, etc.ghc-tcplugin-api?@?A?BCDEFEGEHEIEJEKELMNMOMPQRQSQTQUQVQWXYXZX[X\+]+^_`abacadaefgfhfifjfklmln)o)p)q)r)s8t8u8vwxwywzw{w|w}w~EEEEEEEEEEEEEwwwwwwwwwwwwl??K?JCCCCC<<<<                   /ghc-tcplugin-api-0.13.0.0-4n4h1OejGJNHHftRYusORGHC.TcPlugin.API.NamesGHC.TcPlugin.APIGHC.TcPlugin.API.Internalghc-tcplugin-apiGHC.Tc.Types.ConstraintCtLoc setCtLocMemitWorkGHC.TcTcM GHC.Tc.TypesTcPlugin GHC.PluginsPluginGHC.Core.TyConTyCon newWantedbase GHC.Generics Generically1ghcGHC.Utils.Panic.PlainpanicGHC.Data.FastString FastStringunpackFSfsLitLanguage.Haskell.Syntax.BasicRoleNominalRepresentationalPhantomBoxityBoxedUnboxed#Language.Haskell.Syntax.Module.Name ModuleName mkModuleNameGHC.Tc.Types.OriginCtOriginGHC.Types.Name.OccurrenceOccNameGHC.Unit.TypesModuleUnitIdGHC.Utils.Outputable OutputablepprSDocGHC.Utils.PanicpprPanicGHC.Types.UniqueUniqueGHC.Types.NameName GHC.Types.VarTcTyVarIdTyVarGHC.Tc.Utils.TcType MetaDetails isMetaTyVarGHC.CoreCoreExprCoreBndrExprGHC.Types.TyThingTyThingGHC.Core.TyCo.RepKindPredTypeMultUnivCoProvenanceCoercionType mkForAllTyGHC.Types.Unique.FMUniqFMemptyUFM listToUFMGHC.Types.SrcLoc RealLocatedLocated GenLocatedLunLocgetLocGHC.Types.Unique.DFMUniqDFM lookupUDFMlookupUDFM_DirectlyelemUDFMunitIdFSstringToUnitIdGHC.Types.PkgQualPkgQualLanguage.Haskell.Syntax.Type PromotionFlag NotPromoted IsPromoted isPromotedGHC.Types.Basic TupleSort BoxedTuple UnboxedTupleConstraintTupleArityGHC.Core.DataConDataConpromoteDataConmkVarOcc mkDataOcc mkTyVarOccmkTcOccmkClsOccEvVarCoVarmkTyVar GHC.Core.TypegetTyVar_maybetyConAppTyCon_maybesplitTyConApp_maybe mkCoercionTy mkTyConAppmkAppTy isCoercionTyGHC.Core.Coercion mkTransComkSymComkUnivComkReflCoGHC.Core.ClassFunDepClass classTyCon mkTyConTy CoercionHole ch_co_varch_ref mkTyVarTy mkTyVarTys mkInvisFunTy mkInvisFunTysmkVisFunTyManymkVisFunTysMany mkForAllTysmkPiTymkPiTysManyTyOneTy isTyVarTymkAppTyssplitAppTy_maybe splitAppTys mkNumLitTy isNumLitTy mkStrLitTy isStrLitTytyConAppTyConPicky_maybeisCoercionTy_maybeGHC.Core.TyCo.CompareeqTypemkPrimEqPredRoleGHC.Core.PredicateEqRelNomEqReprEqPred ClassPredEqPred IrredPred ForAllPredclassifyPredType mkClassPred classDataConVarGHC.Core.Reduction ReductionreductionCoercionreductionReducedType GHC.Types.Id mkLocalId MonadThings lookupThinglookupId lookupDataCon lookupTyConGHC.Core.FamInstEnv FamInstEnvTcLevelMetaInfoTcType isSkolemTyVar TcTyThingTcLclEnvGHC.Tc.Types.EvidenceEvExprEvTermEvBindeb_lhseb_rhs EvBindsVar lookupEvBind evCoercionevCast evDataConAppGHC.Core.InstEnvInstEnvsGHC.Unit.Finder.Types FindResultFound NoPackage FoundMultipleNotFoundfr_pathsfr_pkgfr_mods_hiddenfr_pkgs_hidden fr_unusablesfr_suggestions CtFlavour CtEvidence ctev_pred ctev_evarctev_loc ctev_destTcEvDest EvVarDestHoleDestQCInstCtmkNonCanonical ctEvidencectLocctOriginctPred ctFlavourctEqRelctEvExpr ctEvCoercionbumpCtLocDepthGHC.Tc.Solver.InertSetInertSetTcPluginRewriteResultTcPluginNoRewriteTcPluginRewriteTotcPluginReductiontcRewriterNewWantedsTcPluginSolveResulttcPluginInsolubleCtstcPluginSolvedCtstcPluginNewCtsTcGblEnv RewriteEnv TcPluginOkTcPluginContradictionGHC.Tc.Utils.MonadnewName readTcRef writeTcRefGHC.Tc.Utils.TcMTypeisFilledMetaTyVar_maybewriteMetaTyVarGHC.Tc.Solver.MonadTcSgetTcEvBindsMapsetTcEvBindsMapTcPluginErrorMessageTxt PrintType:|::-:MonadTcPluginWork MonadTcPlugin liftTcPluginM unsafeLiftTcMunsafeWithRunInTcM TcPluginM tcPluginInit tcPluginSolvetcPluginRewrite tcPluginStopTcPluginRewriterTcPluginSolver TcPluginStageInitSolveRewriteStop TcPluginStopM tcPluginStopMTcPluginRewriteMtcPluginRewriteMTcPluginSolveMtcPluginSolveM TcPluginInitM tcPluginInitM askEvBinds askDeriveds askRewriteEnvunsafeLiftThroughTcM mkTcPluginmkTcPluginErrorTy$fMonadThingsTcPluginM$fMonadTcPluginTcPluginM$fMonadTcPluginTcPluginM0$fMonadTcPluginTcPluginM1$fMonadTcPluginTcPluginM2$fMonadTcPluginWorkTcPluginM$fMonadTcPluginWorkTcPluginM0$fMonadTcPluginWorkTcPluginM1$fMonadTcPluginWorkTcPluginM2$fFunctorTcPluginM$fApplicativeTcPluginM$fMonadTcPluginM$fFunctorTcPluginM0$fApplicativeTcPluginM0$fMonadTcPluginM0$fFunctorTcPluginM1$fApplicativeTcPluginM1$fMonadTcPluginM1$fFunctorTcPluginM2$fApplicativeTcPluginM2$fMonadTcPluginM2 tcPluginIO tcPluginTracepkgQualToPkgName resolveImportfindImportedModule lookupOrig tcLookupTyContcLookupDataCon tcLookupClasstcLookupGlobaltcLookup tcLookupIdgetEnvs getInstEnvsgetFamInstEnvsmatchFam newUnique newFlexiTyVarisTouchableTcPluginM zonkTcTypezonkCtnewGivenrewriteEnvCtLocsetCtLocRewriteMnewEvVarnewCoercionHole setEvBindmkPluginUnivComkPluginUnivEvTermmkTyFamAppReduction getInertSet setInertSet ResolveNames Lookupable mkOccNamelookupWearPromotedNameResolutionNamedResolved QualifiedName Qualifiednamemodule'package resolveNames$fLookupableTYPEPromoted$fLookupableTYPEClass$fLookupableTYPEDataCon$fLookupableTYPETyCon$fResolveNameab$fGTraversableCcK1K1$fGTraversableCcV1V1$fGTraversableCcU1U1$fGTraversableCcM1M1$fGTraversableCc:+::+:$fGTraversableCc:*::*:$fResolveNamesGenerically1 GHC.TypeError ErrorMessageghc-prim GHC.TypesIOBoolTrue GHC.MaybeJustIntFloat ResolveName resolveName UnwearNamed