HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Package0.20.1.0Type SystemGHCPlugin

ghc-tcplugin-api

An API for type-checker plugins.

Modules

5 modules
  • GHC.Builtins151Helper umbrella re-exports of various known entities to GHC: known-key
  • GHC.TcPlugin.API238This module provides a unified interface for writing type-checking plugins for GHC. It attempts to re-export all the functionality from G…
  • GHC.TcPlugin.API.Names8This module provides an optional framework that facilitates name lookup
  • GHC.TcPlugin.API.TyConSubst3This module provides functionality for recognising whether a type is a
Internal modules · 1

Description

This library provides a streamlined monadic interface for writing GHC type-checking plugins.

Each stage in a type-checking plugin (initialisation, solving, rewriting, post-tc) 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.

Depends on

6 packages

Used by in this set · 2