Working with monads and transformers
The libraries in this subsection are as follows:
lifted-base,stm-lifted: Lifting IO operations to arbitrary monad stacksmonad-control: Lifting general control operations to any monad (providesliftBaseWith)monad-logger: Adding high-performance and flexible logging facilities to any monadLogicT: A backtracking logic programming monadmonad-unlift: Provides more reliable state-saving in monad transformer stacks for a subset of transformers (specifically, monad morphisms)monad-loops: Monad combinators thatmap,iterate,fold, andunfoldwith monadic side effects
For choice and considerations of monads and transformers themselves, refer to the discussion in Chapter 2, Choose the Correct Data Structures. Logging with monad-logger and fast-logger is discussed in detail in Chapter 6, I/O and Streaming.
Working with monad transformer stacks is most convenient when the actions of used libraries are readily overloaded over a type-class that permits use of an arbitrary...