Just like monad-control, except less efficient, and the monadic state terms are all * -> *

Version on this page:0.0.1
LTS Haskell 22.30:
Stackage Nightly 2024-07-22:
Latest on Hackage:

See all snapshots monad-control-aligned appears in

BSD-3-Clause licensed by Athan Clark
Maintained by Athan Clark
This version can be pinned in stack with:monad-control-aligned-0.0.1@sha256:fbcade30d5867838d745f626ad20a927be03cfcdde229cf69ada444c7ed93174,1387

Module documentation for 0.0.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.

The package includes a copy of the monad-peel testsuite written by Anders Kaseorg The tests can be performed by using cabal test.

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