4 MaybeT

5 MonadSupply

Here is a simple monad/monad transformer for computations which consume values from a (finite or infinite) supply. Note that due to pattern matching, running out of supply in a non-MonadZero monad will cause an error.

15 Lazy and Strict variants

This section contains monads that have interesting String or Lazy properties.

15.1 LazyWriterT

This came up on the mailing list: Why is WriterT never lazy? The answer is it does not use lazy patterns with "~". So here is a more useful New monads/LazyWriterT that add two "~" to the definition of (>>=) and renames WriterT to LazyWriterT.

15.2 Strict RWS

This was contribute by John Meacham on on the haskell-cafe mailing list. New monads/UnboxedRWS is an strict variant of RWS.