HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Package0.20.1.0Type SystemGHCPlugin

ghc-tcplugin-api

An API for type-checker plugins.

Modules

  • GHC.BuiltinsHelper umbrella re-exports of various known entities to GHC: known-key
  • GHC.TcPlugin.APIThis 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.NamesThis module provides an optional framework that facilitates name lookup
  • GHC.TcPlugin.API.TyConSubstThis 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