On 10 December 2010 01:40, Magicloud Magiclouds <magicloud.magiclo...@gmail.com> wrote: > On Wed, Dec 8, 2010 at 6:46 PM, Henk-Jan van Tuyl <hjgt...@chello.nl> wrote: >> On Wed, 08 Dec 2010 10:03:40 +0100, Magicloud Magiclouds >> <magicloud.magiclo...@gmail.com> 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. IORef also uses non-standard code. >> >> Regards, >> Henk-Jan van Tuyl >> >> >> -- >> http://Van.Tuyl.eu/ >> http://members.chello.nl/hjgtuyl/tourdemonad.html >> -- >> > > First to notice that. So standard-wise, there is no way to do state thing?
It's not hard to create your own state monad. You are right, though, that there is no standard library support for this in the Haskell2010 standard. -- Push the envelope. Watch it bend. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe