The Monad class defines the basic operations over a monad, a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's do expressions provide a convenient syntax for writing monadic expressions. Minimal complete definition: >>= and return. Instances of Monad should satisfy the following laws: > return a >>= k == k a > m >>= return == m > m >>= (\x -> k x >>= h) == (m >>= k) >>= h Instances of both Monad and Functor should additionally satisfy the law: > fmap f xs == xs >>= return . f The instances of Monad for lists, Data.Maybe.Maybe and System.IO.IO defined in the Prelude satisfy these laws.
The Functor, Monad and MonadPlus classes, with some useful operations on monads.
Monads having fixed points with a 'knot-tying' semantics. Instances of MonadFix should satisfy the following laws: * purity mfix (return . h) = return (fix h) * left shrinking (or tightening) mfix (\x -> a >>= \y -> f x y) = a >>= \y -> mfix (\x -> f x y) * sliding mfix (Control.Monad.liftM h . f) = Control.Monad.liftM h (mfix (f . h)), for strict h. * nesting mfix (\x -> mfix (\y -> f x y)) = mfix (\x -> f x x) This class is used in the translation of the recursive do notation supported by GHC and Hugs.
Monads that also support choice and failure.
package
Provides a monad-transformer version of the Control.Exception.catch function. For this, it defines the MonadCatchIO class, a subset of MonadIO. It defines proper instances for most monad transformers in the mtl library. Version 0.3.0.5
package
Functions like alloca are provided, except not restricted to IO. Version 0.1
package
Provides functions to throw and catch exceptions. Unlike the functions from Control.Exception, which work in IO, these work in any stack of monad transformers (from the transformers package) with IO as the base monad. You can extend this functionality to other monads, by creating an instance of the MonadCatchIO class. Warning: this package is deprecated. Use the exceptions package instead, if possible. Version 0.3.1.0
package
Functions like alloca are provided, except not restricted to IO. Version 0.1
The strategy of combining computations that can throw exceptions by bypassing bound functions from the point an exception is thrown to the point that it is handled. Is parameterized over the type of error information and the monad type constructor. It is common to use Either String as the monad type constructor for an error monad in which error descriptions take the form of strings. In that case and many other common cases the resulting monad is already defined as an instance of the MonadError class. You can also define your own error type and/or use a monad type constructor other than Either String or Either IOError. In these cases you will have to explicitly define instances of the Error and/or MonadError classes.
Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class. Instances should satisfy the following laws, which state that liftIO is a transformer of monads: *  . return = *  (m >>= f) = liftIO m >>= > (liftIO .
package
A fast-paced 2-D scrolling vector graphics clone of the arcade game Gradius; it is dedicated to the 20th anniversary of Gradius series. Version 0.99
package
package
&quot;Prompting&quot; monad that allows splitting the description of a computation from the implementation of the effects used in that computation. http://www.haskell.org/pipermail/haskell-cafe/2008-January/038301.html Version 1.0.0.3
package
Support for computations which consume random values. Version 0.1.12
package
Support for lazy computations which consume random values. Version 0.1
See examples in Control.Monad.Reader. Note, the partially applied function type (->) r is a simple reader monad. See the instance declaration below.
Minimal definition is either both of get and put or just state
The class of monad transformers. Instances should satisfy the following laws, which state that lift is a transformer of monads: *  . return = *  (m >>= f) = lift m >>= > (lift .
package
This package provides automated lifting of operations via functional dependencies for the transformers-abort package. Version 0.4
package
package
Monadically map objects to unique ints. Version 0.0.2
package
This package has been removed. Version 0.2.0
package
The library provides functions for encoding and decoding complex data structures with unique integer numbers.  The codec structure can be explicitly defined which distinguishes this package from a monad-atom library. Version 0.2.0
package
This package defines the type class MonadBaseControl, a subset of MonadBase into which generic control operations such as catch can be lifted from IO or any other base monad. Instances are based on monad transformers in MonadTransControl, which includes all standard monad transformers in the transformers library except ContT. See the lifted-base package which uses monad-control to lift IO operations from the base library (like catch or bracket) into any monad that is an instance of MonadBase or MonadBaseControl. 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 and TypeFamilies language extensions to simplify and speedup most definitions. The following criterion based benchmark shows that monad-control is on average about 99% faster than monad-peel: git clone https://github.com/basvandijk/bench-monad-peel-control Version 0.3.2.2
package
This package defines a monad transformer, applicable to any monad, that allows the monadic computation to suspend and to be later resumed. The transformer is parameterized by an arbitrary functor, used to store the suspended computation's resumption. Version 0.8
package
package
package
package
A type class for monads that have an &quot;unsafeInterleave&quot; operation. Instances are provided for IO and both strict and lazy ST. Version 0.1
package
This package uses template-haskell for determining source code locations of messages. Version 0.3.4.0
package
Some useful control operators for looping. New in 0.4: STM loop operators have been split into a new package instead of being conditionally-built. New in 0.3.2.0: various functions for traversing lists and computing minima/maxima using arbitrary procedures to compare or score the elements. Version 0.4.2
package
Some useful control operators for looping. Version 0.4
package
A monad to calculate linear recursive sequence efficiently. Matrix multiplication and fast exponentiation algorithm are used to speed up calculating the number with particular index in the sequence. This library also provides a monadic DSL to describe the sequence. Version 0.0.2.1
package
Memoization monad transformer supporting most of the standard monad transformers and a range of memoization cache types: from default pure maps to extremely fast mutable vectors To add memoization behaviour to a monadic function: 1) Add Control.Monad.Memo.memo combinator at the point when memoization is required (i.e. recursive call) > import Control.Monad.Memo > fibm 0 = return 0 > fibm 1 = return 1 > fibm n = do > n1 <- memo fibm (n-1) > n2 <- memo fibm (n-2) > return (n1+n2) 2) Use approprite *eval* or *run* function to evaluate resulting `MonadMemo` monad: > startEvalMemo (fibm 100) See detailed description and examples: Control.Monad.Memo Version 0.4.1
package
Often we need an efficient way to generate high quality pseudo-random numbers in Haskell. We have good generators themselves (for example, the mersenne-random-pure64 package), however, users are often tempted to store the generator in a lazy state monad. This causes performance problems. This package provides an optimized Rand monad for monadic generation of random numbers from a state, with close attention to performance. You may have results an order of magnitude or more better than using Control.Monad.State to store your generator. Version 0.1
package
The library provides an Ox monad and accompanying functions which are intended to simplify writing functional expressions over input sentence with arbitrary type of token.  Values of such functional expressions can be subsequently used as observations in input data for sequential classifiers. Version 0.3.0
package
The Par monad offers a simple API for parallel programming. The library works for parallelising both pure and IO computations, although only the pure version is deterministic. The default implementation provides a work-stealing scheduler and supports forking tasks that are much lighter weight than IO-threads. For complete documentation see Control.Monad.Par. Some examples of use can be found in the examples/ directory of the source package. Other related packages: * abstract-par provides the type classes that abstract over different implementations of the Par monad. * monad-par-extras provides extra combinators and monad transformers layered on top of the Par monad. Changes in 0.3.4 relative to 0.3: * Fix bugs that cause &quot;thread blocked indefinitely on MVar&quot; crashes. * Added Control.Monad.Par.IO Version 0.3.4.6