polytropos-generics: Structural datatype generics, representation bridging, and whole-data traversal
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
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]
Properties
| Versions | 0.1.0.0, 0.1.0.2, 0.1.0.3 |
|---|---|
| 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 |
| 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) |
| Uploaded | by nyc at 2026-10-17T18:55:13Z |
Modules
[Index] [Quick Jump]
- Polytropos
Downloads
- polytropos-generics-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees