@hackage ghc-tcplugin-api0.17.2.0
An API for type-checker plugins.
Installation
Dependencies (6)
- array >=0.5.3.0 && <0.6
- base >=4.13.0 && <4.23
- containers >=0.6 && <0.9
- ghc >=8.8 && <9.16
- template-haskell >=2.15 && <2.26
- transformers >=0.5 && <0.7 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.