[Haskell-cafe] Stacking monads - beginner design question
byorgey at gmail.com
Wed Jan 30 10:25:04 EST 2008
On Jan 30, 2008 12:44 AM, Adam Smyczek <adam.smyczek at gmail.com> wrote:
> My application has to manage a data set. I assume the state monad is
> designed for this.
> The state changes in functions that:
> a. perform IO actions and
> b. return execution status and execution trace (right now I'm using
> WriteT for this).
> Is the best solution:
> 1. to build a monad stack (for example State -> Writer -> IO) or
> 2. to use IORef for the data set or
> 3. something else?
> Are monad stacks with 3 and more monads common?
> How could an example implementation look like?
Indeed, this is quite common. You may be interested in reading
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe