Package1.0.10Control
managed
A monad for managed values
- Version1.0.10
- CategoryControl
- LicenceBSD-3-Clause
- AuthorGabriella Gonzalez
- MaintainerGenuineGabriella@gmail.com
- Pinned byhackage managed 1.0.10
- Sourcehackage.haskell.org/package/managed-1.0.10
Modules
2 modules- Control.Monad.Managed8An example Haskell program to copy data from one handle to another might
- Control.Monad.Managed.Safe7This module is a safer subset of Control.Monad.Managed that only lets you
Description
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
Depends on
2 packages- base-4.20.2.0with GHC
- transformers-0.6.1.1with GHC