
Henk-Jan van Tuyl schrieb:
On Wed, 08 Dec 2010 10:03:40 +0100, Magicloud Magiclouds
wrote: Hi, Formerly, I had IORef and some state monad to do the task of keeping states. Now in haskell 2010, I cannot find anything about it. Do I have to use ghc base package for this function?
These are not standard Haskell '98 or Haskell 2010. You can find IORef in the base package; the state monad is in both the mtl and the transformers package (mtl is deprecated). The state monad uses the multi-parameter type class extension and is therefore not in standard Haskell '98 or Haskell 2010 code.
Since mtl is split into transformers (Haskell 98 compatible code) and the multi-parameter type classes in mtl-2/monad-fd, you can use the State monad in Haskell 98 and Haskell 2010 code.