[Haskell-cafe] Building Monads from Monads

Cale Gibbard cgibbard at gmail.com
Thu Mar 23 23:49:17 EST 2006

Oh, and almost forgot, you can check out lots of examples of this not
only in the mtl, but also on the (old) Haskell Wiki. I've written a
lot of simple (sometimes trivial) examples for people to look at

Unique values -- very simple

A supply of values, a slight generalisation of the above

Random number generation

A state monad transformer with undo/redo

Last but not least, check out my Sudoku solver (everyone has one of
these nowadays). I wrote it by constructing a special monad, in which
the problem becomes really easy to solve. (Basically, a state monad
which enforces the sudoku rules, and handles nondeterminism

hope this all helps :)
 - Cale

More information about the Haskell-Cafe mailing list