| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Fri, 16 Jan 2026 04:38:33 GMT
X-Served-By: cache-dfw-kdal2120133-DFW, cache-bom-vanm7210056-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768538314.552422,VS0,VE302
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
stacked: A modern indexed monad stack
stacked: A modern indexed monad stack
Modules
[Index] [Quick Jump]
Downloads
- stacked-0.1.1.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, 0.1.1 |
|---|---|
| Dependencies | base (>=4.19 && <4.22), comonad [details] |
| License | MIT |
| Copyright | (c) Modus Create LLC and its affiliates |
| Author | Arnaud Spiwack |
| Maintainer | arnaud.spiwack@tweag.io |
| Uploaded | by aspiwack at 2026-01-08T08:15:43Z |
| Home page | https://github.com/tweag/stacked#readme |
| Bug tracker | https://github.com/tweag/stacked/issues |
| Source repo | head: git clone https://github.com/tweag/stacked |
| Distributions | NixOS:0.1.0 |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 16 total (8 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-01-08 [all 1 reports] |
Readme for stacked-0.1.1
[back to package description]Stacked
The modern indexed monad stack
Stacked is an indexed monad (see e.g. this description by Conor McBride) library built from the ground up to use modern GHC features (such as qualified do and quantified constraints).
For instance
- The monad hierarchy follows that of base with for instance
ApplicativeandMonad. These don't use distinctive namesIxApplicative,IxMonad, orixBind: they use the standardApplicative,Monad, and(>>=)names from base, and are meant to be imported qualified, and typically use with the qualified do notation. - But there is no indexed functor class defined in this library because, thanks
to quantified constraints, the standard functor class suffices. The functor
super-class for indexed applicative looks like
(forall i j. Functor f i j) => … - We also take the opportunity of growing the stack from scratch to define a
single
Additiveclass to replaceAlternativeandMonadPlus. We then defineAlternativeas
Which uses both quantified constraints and impredicative types.type Alternative m = (Applicative m, forall r r' a. Additive (m r r' a))
The library is meant to feel familiar to Haskell programmers, despite the clean-ups that modern Haskell affords.
Points of interest
- Stacked has a rich sublibrary on continuation indexed monads and their relation with delimited control. This part of the library was developed to serve the needs of the Pup library.