cabal-version: 3.0
name: polytropos-reader-soup
version: 0.1.0.2
synopsis: Composable multi-context Reader monad with zero-overhead row polymorphism
description:
A composable, extensible multi-context Reader environment for <https://hackage.haskell.org/package/polytropos 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
<https://github.com/funflow/porcupine 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.
license: EUPL-1.2 OR Apache-2.0
license-file: LICENSE
author: Nadia Yvette Chambers
maintainer: nadia.yvette.chambers@ik.me
category: Control, Monads, Records
homepage: https://github.com/NadiaYvette/polytropos
bug-reports: https://github.com/NadiaYvette/polytropos/issues
extra-doc-files:
README.md
, CHANGELOG.md
build-type: Simple
source-repository head
type: git
location: https://github.com/NadiaYvette/polytropos
subdir: packages/polytropos-reader-soup
library
default-language: GHC2021
hs-source-dirs: src
exposed-modules:
Polytropos.ReaderSoup
Polytropos.ReaderSoup.Resource
ghc-options: -Wall
build-depends:
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
test-suite polytropos-reader-soup-test
type: exitcode-stdio-1.0
default-language: GHC2021
hs-source-dirs: test
main-is: Main.hs
ghc-options: -Wall -fplugin=Polytropos.Plugin
build-depends:
base,
mtl,
polytropos-core,
polytropos-plugin,
polytropos-reader-soup,
resourcet,
tasty,
tasty-hunit,
transformers,
unliftio-core