monad-control-aligned

Lift control operations, like exception catching, through monad transformers

https://github.com/athanclark/monad-control

LTS Haskell 22.43:0.0.2.1
Stackage Nightly 2024-12-05:0.0.2.1
Latest on Hackage:0.0.2.1

See all snapshots monad-control-aligned appears in

BSD-3-Clause licensed by Bas van Dijk, Anders Kaseorg
Maintained by Oleg Grenrus, Bas van Dijk
This version can be pinned in stack with:monad-control-aligned-0.0.2.1@sha256:6c65ec1b639556ebde2c46efffaac496c3141b73131791c398bd66dcf4034dd3,2411

Module documentation for 0.0.2.1

Hackage Build Status

This package defines the type class MonadControlIO, a subset of MonadIO into which generic control operations such as catch can be lifted from IO. Instances are based on monad transformers in MonadTransControl, which includes all standard monad transformers in the transformers library except ContT.

Note that this package is a rewrite of Anders Kaseorg’s monad-peel library. The main difference is that this package provides CPS style operators and exploits the RankNTypes language extension to simplify most definitions.

This criterion based benchmark shows that monad-control is on average about 2.5 times faster than monad-peel.