
Andre Nathan wrote:
I think my code is a bit too long and that probably makes it hard for someone to help... Does anyone know of good example code using StateT for keeping a global state other than the one at the "Simple StateT use" page on the wiki?
The one I have used is All About Monads: http://www.haskell.org/all_about_monads/html/index.html Then, there is sigfpe's (always excellent) short but sweet blog posting: http://sigfpe.blogspot.com/2006/05/grok-haskell-monad-transformers.html And finally (although I hesitate to mention it), there is my nroff-alike from Software Tools: http://www.crsr.net/Programming_Languages/SoftwareTools/ch7.html (Note: I haven't gotten to it in the revisions following the comments I received here and there are many things that need work. The notes are incoherent, it's more Pascallish than Haskell, and there are no guarantees that it won't ruin you forever.) -- Tommy M. McGuire mcguire@crsr.net