TcPluginM is the monad in which type-checking plugins operate.
Moduleghc-9.10.3GHC2021
GHC.Tc.Plugin
This module provides an interface for typechecker plugins to
access select functions of the TcM, principally those to do with
reading parts of the state.
- 2 types
- 27 values
- Packageghc-9.10.3
- Exports29
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourcePlugin.hs
Basic TcPluginM functionality
4 declarationsPerform some IO, typically to interact with an external tool.
Output useful for debugging the compiler.
This function provides an escape for direct access to
the TcM monad. It should not be used lightly, and
the provided TcPluginM API should be favoured instead.
Finding Modules and Names
3 declarationsThe result of searching for an imported module.
NB: FindResult manages both user source-import lookups (which can result in Module) as well as direct imports for interfaces (which always result in InstalledModule).
Constructors
Found ModLocation ModuleThe module was found
NoPackage UnitThe requested unit was not found
FoundMultiple [(Module, ModuleOrigin)]_Error_: both in multiple packages
NotFoundNot found
fr_paths :: [FilePath]Places where I looked
fr_pkg :: Maybe UnitJust p => module is in this unit's manifest, but couldn't find the .hi file
fr_unusables :: [UnusableUnit]Module is in these units, but it is unusable
fr_suggestions :: [ModuleSuggestion]Possible mis-spelled modules
Looking up Names in the typechecking environment
6 declarationsGetting the TcM state
6 declarationsType variables
3 declarationsZonking
2 declarationsConfused by zonking? See Note [What is zonking?] in GHC.Tc.Zonk.Type.
Creating constraints
3 declarationsCreate a new Wanted constraint with the given CtLoc.
Create a new given constraint, with the supplied evidence.
This should only be invoked within tcPluginSolve.
Create a fresh coercion hole.
This should only be invoked within tcPluginSolve.
Manipulating evidence bindings
2 declarationsCreate a fresh evidence variable.
This should only be invoked within tcPluginSolve.
Bind an evidence variable.
This should only be invoked within tcPluginSolve.