polytropos-reader-soup: Composable multi-context Reader monad with zero-overhead row polymorphism
A composable, extensible multi-context Reader environment for polytropos.
Instead of defining exponentially growing MonadFoo / MonadBar type class stacks or deeply nested
ReaderT hierarchies, Polytropos.ReaderSoup.ReaderSoup collects all application contexts in a single
flat contiguous row (Polytropos.Record).
.
Inspired by and acknowledging Yves Parès's pioneering reader-soup package from the
porcupine ecosystem, re-architected from scratch
on top of Polytropos's high-performance flat array representation (Polytropos.Core.Rep)
and compile-time dictionary synthesis (Polytropos.Plugin).
.
Key Features:
.
* Flat multi-context environment (Polytropos.ReaderSoup.ReaderSoup) backed by Polytropos's $O(1)$ flat array representation.
* Direct context access (Polytropos.ReaderSoup.askSoup) via type-level labels or OverloadedRecordDot.
* Structural sub-soup slicing (Polytropos.ReaderSoup.filtering) via compile-time Polytropos.SubRow projection.
* Single-context projection (Polytropos.ReaderSoup.Spoon) giving standard MonadReader instances for isolated subsystems.
* Context bridging (Polytropos.ReaderSoup.SoupContext) with Polytropos.ReaderSoup.picking, Polytropos.ReaderSoup.scooping, and Polytropos.ReaderSoup.pouring.
* Modular runner composition (Polytropos.ReaderSoup.ContextRunner, Polytropos.ReaderSoup.consumeSoup).
* Resource management integration (Polytropos.ReaderSoup.Resource) supporting resourcet's Control.Monad.Trans.Resource.ResourceT.
.
Start at the front door module Polytropos.ReaderSoup for comprehensive documentation and worked examples.
[Skip to Readme]
Downloads
- polytropos-reader-soup-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
- No Candidates
| Versions [RSS] | 0.1.0.2 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.14 && <5), exceptions (>=0.10 && <0.11), monad-control (>=1.0 && <1.1), mtl (>=2.2 && <2.4), polytropos-core (>=0.1 && <0.2), polytropos-plugin (>=0.1 && <0.2), primitive (>=0.8 && <1.0), resourcet (>=1.2 && <1.4), safe-exceptions (>=0.1 && <0.2), transformers (>=0.5 && <0.7), transformers-base (>=0.4 && <0.5), unliftio (>=0.2 && <0.3), unliftio-core (>=0.2 && <0.3) [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:39Z |
| Category | Control, Monads, Records |
| 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-reader-soup) |
| Distributions | |
| Downloads | 3 total (3 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2026-10-21 [all 1 reports] |