Hi,

Is there some abstraction in current ghc library
that implements something like Reader, but where
the value of the environment is updated at every
"step"? I imagine something that instead of running
like this:

runReader ( do ... ) environment

I would run like:

runReader ( do ... ) environment update_function

So, when I write a monad like:

do
     a <- asks f
     b <- asks f2
     c <- asks f3

f, f2 and f3 would be called with parameters
environment, (update_function environment),
(update_function . updatefunction $ environment)
etc.

Does that make sense? Is it easy to adapt
something already existing to do that?

Thanks,
Maurício

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to