|
Packit |
30e1d2 |
[![Hackage](https://img.shields.io/hackage/v/monad-control.svg)](https://hackage.haskell.org/package/monad-control)
|
|
Packit |
30e1d2 |
[![Build Status](https://travis-ci.org/basvandijk/monad-control.svg)](https://travis-ci.org/basvandijk/monad-control)
|
|
Packit |
30e1d2 |
|
|
Packit |
30e1d2 |
This package defines the type class `MonadControlIO`, a subset of
|
|
Packit |
30e1d2 |
`MonadIO` into which generic control operations such as `catch` can be
|
|
Packit |
30e1d2 |
lifted from `IO`. Instances are based on monad transformers in
|
|
Packit |
30e1d2 |
`MonadTransControl`, which includes all standard monad transformers in
|
|
Packit |
30e1d2 |
the `transformers` library except `ContT`.
|
|
Packit |
30e1d2 |
|
|
Packit |
30e1d2 |
Note that this package is a rewrite of Anders Kaseorg's `monad-peel`
|
|
Packit |
30e1d2 |
library. The main difference is that this package provides CPS style
|
|
Packit |
30e1d2 |
operators and exploits the `RankNTypes` language extension to simplify
|
|
Packit |
30e1d2 |
most definitions.
|
|
Packit |
30e1d2 |
|
|
Packit |
30e1d2 |
[This `criterion`](https://github.com/basvandijk/bench-monad-peel-control)
|
|
Packit |
30e1d2 |
based benchmark shows that `monad-control` is on average about 2.5
|
|
Packit |
30e1d2 |
times faster than `monad-peel`.
|