polytropos-generics: Structural datatype generics, representation bridging, and whole-data traversal
Generic deriving, representation bridging, and structural traversal engine for polytropos.
This package bridges nominal Haskell algebraic data types (ADTs) to and from the
unified flat representation Polytropos.Core.Rep, and provides zero-overhead structural operations
(Polytropos.Generics.geq, Polytropos.Generics.gcompare, Polytropos.Generics.gshowsPrec,
Polytropos.Generics.gmap, Polytropos.Generics.gfoldMap) across open rows (Polytropos.Record, Polytropos.Variant)
and nominal types.
Unlike large-generics (which is strictly record-only and models 1D SOP products),
polytropos-generics unifies sums and products into one tagged representation backed
by a 2D dictionary matrix (SmallArray (SmallArray (DictAny c))) for O(1) constructor dispatch.
Unlike standard GHC.Generics, it executes as tight unrolled loops over flat contiguous
memory rather than traversing nested binary trees.
Start at the front door module Polytropos.Generics for architectural rationales, usage guidance, and worked examples for both open rows and nominal ADTs.
[Skip to Readme]
Modules
- Polytropos
- Polytropos.Generics
Downloads
- polytropos-generics-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.14 && <5), polytropos-core (>=0.1 && <0.2), primitive (>=0.7 && <0.10) [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 | Generics, Data |
| 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-generics) |
| Distributions | |
| 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] |