[Haskell-cafe] How do I lift Control.Monad.Reader.local?
David Fox
dsf at seereason.com
Thu Oct 31 16:17:32 UTC 2013
I can write a stack push function in the reader monad like so:
import Control.Monad.Reader
push :: String -> Reader [String] a -> Reader [String] a
push s action = local (s :) action
How can I write a push that works inside a monad transformer?
push' :: MonadTrans t => String -> t (Reader [String]) a -> t (Reader
[String]) a
push' s action = ???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131031/b0d76120/attachment.html>
More information about the Haskell-Cafe
mailing list