Create a new Wanted constraint with the given CtLoc.
Moduleghc-tcplugins-extra-0.5Haskell2010
GHC.TcPluginM.Extra
- 12 values
- Cpp
- Packageghc-tcplugins-extra-0.5
- Exports12
- LanguageHaskell2010
- LicenceBSD-2-Clause
- SourcePlugin.hs
Create new constraints
2 declarationsCreate a new [G]iven constraint, with the supplied evidence. This must not
be invoked from tcPluginInit or tcPluginStop, or it will panic.
Creating evidence
2 declarationsThe EvTerm equivalent for Unsafe.unsafeCoerce
evByFiat Deprecated. evByFiat creates proofs that can lead to unsoundness, use evByFiatWithDependencies instead. See also https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12037
The EvTerm equivalent for Unsafe.unsafeCoerce
Lookup
2 declarationslookupModule :: ModuleNameName of the module
-> FastStringName of the package containing the module. NOTE: This value is ignored on ghc>=8.0.
-> TcPluginM Module
Find a module
Trace state of the plugin
1 declarationPrint out extra information about the initialisation, stop, and every run
of the plugin when -ddump-tc-trace is enabled.
Substitutions
5 declarationsFlattens evidence of constraints by substituting each others equalities.
NB: Should only be used on [G]iven constraints!
NB: Doesn't flatten under binders
Create simple substitution from type equalities
Create flattened substitutions from type equalities, i.e. the substitutions have been applied to each others right hand sides.
Apply substitutions in Types
NB: Doesn't substitute under binders
Apply substitution in the evidence of Cts