managed

A monad for managed values

Version on this page:1.0.8@rev:1
LTS Haskell 18.23:1.0.9@rev:1
Stackage Nightly 2022-01-25:1.0.9@rev:1
Latest on Hackage:1.0.9@rev:1

See all snapshots managed appears in

BSD-3-Clause licensed by Gabriel Gonzalez
Maintained by Gabriel439@gmail.com
This version can be pinned in stack with:managed-1.0.8@sha256:82b73a502ea627eecaf34d7f70ced6d2db4b8fa6d9afe9abc4b410e6286225ad,1626

Module documentation for 1.0.8

Depends on 2 packages(full list with versions):
Used by 1 package in nightly-2021-11-28(full list with versions):

In Haskell you very often acquire values using the with... idiom using functions of type (a -> IO r) -> IO r. This idiom forms a Monad, which is a special case of the ContT monad (from transformers) or the Codensity monad (from kan-extensions). The main purpose behind this package is to provide a restricted form of these monads specialized to this unusually common case.

The reason this package defines a specialized version of these types is to:

  • be more beginner-friendly,

  • simplify inferred types and error messages, and:

  • provide some additional type class instances that would otherwise be orphan instances