James,

Which version of Control.Monad.State are you importing?

If you're just importing vanilla Control.Monad.State, that's actually sending you to Control.Monad.State.Lazy.

Using Control.Monad.State.Strict might solve your problems, srsly.  Laziness can result in epically failing memory leaks.

Louis Wasserman
wasserman.louis@gmail.com
http://profiles.google.com/wasserman.louis