ghc-tcplugin-api: An API for type-checker plugins.
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.
Modules
[Index] [Quick Jump]
- GHC
- Builtin
- GHC.Builtin.Names
 - GHC.Builtin.Types
- GHC.Builtin.Types.Prim
 
 
 - Core
- GHC.Core.Make
 
 - GHC.Plugins
 - TcPlugin
 - Types
- Unique
- GHC.Types.Unique.DFM
 - GHC.Types.Unique.DSet
 - GHC.Types.Unique.FM
 - GHC.Types.Unique.Set
 
 
 - Unique
 - Utils
- GHC.Utils.Outputable
 
 
 - Builtin
 
Downloads
- ghc-tcplugin-api-0.18.1.0.tar.gz [browse] (Cabal source package)
 - Package description (as included in the package)
 
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
 
| Versions [RSS] | 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.4.0.0, 0.4.1.0, 0.5.0.0, 0.5.1.0, 0.6.0.0, 0.6.1.0, 0.7.0.0, 0.7.1.0, 0.8.0.0, 0.8.1.0, 0.8.2.0, 0.8.3.0, 0.9.0.0, 0.10.0.0, 0.11.0.0, 0.12.0.0, 0.13.0.0, 0.14.0.0, 0.15.0.0, 0.16.0.0, 0.16.1.0, 0.16.2.0, 0.17.0.0, 0.17.1.0, 0.17.2.0, 0.18.0.0, 0.18.1.0 (info) | 
|---|---|
| Change log | changelog.md | 
| Dependencies | 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) [details] | 
| License | BSD-3-Clause | 
| Copyright | 2021-2025 Sam Derbyshire | 
| Author | Sam Derbyshire | 
| Maintainer | Sam Derbyshire | 
| Category | Type System, GHC, Plugin | 
| Home page | https://github.com/sheaf/ghc-tcplugin-api | 
| Uploaded | by sheaf at 2025-10-09T19:28:11Z | 
| Distributions | NixOS:0.14.0.0, Stackage:0.18.1.0 | 
| Reverse Dependencies | 7 direct, 85 indirect [details] | 
| Downloads | 2420 total (53 in the last 30 days) | 
| Rating | 2.25 (votes: 2) [estimated by Bayesian average] | 
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2025-10-09 [all 1 reports]  |