@hackage ghc-tcplugin-api0.7.0.0
An API for type-checker plugins.
Deprecated
Dependencies (3)
- base >=4.13.0 && <4.18
- ghc >=8.8 && <9.4
- transformers >=0.5 && <0.6 Show all…
Dependents (7)
@hackage/ghc-typelits-knownnat, @hackage/ghc-typelits-extra, @hackage/large-anon, @hackage/if-instance, @hackage/ghc-typelits-natnormalise, @hackage/typelet, Show all…
This library provides a streamlined monadic interface for writing GHC type-checking plugins.
Each stage in a type-checking plugin (initialisation, solving, rewriting, shutdown) has a corresponding monad, preventing operations that are only allowed in some stages to be used in the other stages. Operations that work across multiple stages are overloaded across monads using MTL-like typeclasses.
Some operations, like creating evidence for constraints or creating custom type error messages, are also simplified.
Please refer to the associated GitHub repository for example usage.