polytropos-plugin: TcPlugin that emits literal evidence for Polytropos row classes
A GHC typechecker plugin for polytropos
that solves the evidence-class constraints (Polytropos.Core.FieldIndex,
Polytropos.Core.ConstructorIndex, Polytropos.Core.RowEq, Polytropos.Core.RowShow,
Polytropos.Core.RowEqSum, Polytropos.Core.RowShowSum, Polytropos.Core.AllFields)
by inspecting the row carried in a Polytropos.Core.RowRep's type and emitting literal
slot indices, tags, and dictionary vectors directly into GHC Core AST — eliminating
inductive type-level search and pointer-chasing runtime overhead entirely.
Uses the ghc-tcplugin-api library for a streamlined interface to GHC's typechecker plugin API across compiler versions.
Start at the front door module Polytropos.Plugin for complete usage
instructions and worked examples. Enable in consuming packages via:
ghc-options: -fplugin=Polytropos.Plugin.
[Skip to Readme]
Modules
- Polytropos
- Polytropos.Plugin
- Polytropos.Plugin.Source
- Polytropos.Plugin
Downloads
- polytropos-plugin-0.1.0.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.2 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.18 && <4.23), ghc (>=9.6 && <9.15), ghc-tcplugin-api (>=0.1 && <0.21) [details] |
| License | (EUPL-1.2 OR Apache-2.0) |
| Author | Nadia Yvette Chambers |
| Maintainer | nadia.yvette.chambers@ik.me |
| Uploaded | by nyc at 2026-10-21T21:34:23Z |
| Category | Compiler Plugin |
| Home page | https://github.com/NadiaYvette/polytropos |
| Bug tracker | https://github.com/NadiaYvette/polytropos/issues |
| Source repo | head: git clone https://github.com/NadiaYvette/polytropos(packages/polytropos-plugin) |
| Distributions | |
| Reverse Dependencies | 15 direct, 0 indirect [details] |
| Downloads | 3 total (3 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs pending Build status unknown [no reports yet] |