[Haskell-cafe] Strong version of 'local' for reader monad

Tom Schrijvers tom.schrijvers at cs.kuleuven.be
Thu Dec 16 12:24:25 CET 2010


On Mon, Dec 13, 2010 at 9:30 PM, Brent Yorgey <byorgey at seas.upenn.edu>wrote:

> Hi all,
>
> Today I wanted this function
>
>  strongLocal :: (MonadReader r1 m1, MonadReader r2 m2) =>
>                 (r2 -> r1) -> m1 a -> m2 a
>
> Of course, after staring at this type for ten seconds I realized that
> it cannot be implemented.  But I wondered whether anyone has any
> pointers to anything related, or if anyone has good ideas for a
> reasonable interface that would allow this.
>

Here's a draft by Bruno Oliveira and me on manipulating the monad stack.
The examples in Section 4.3 on p.12-13 are related:

http://users.ugent.be/~tschrijv/Research/papers/virtual_monad_stack.pdf<http://users.ugent.be/%7Etschrijv/Research/papers/virtual_monad_stack.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20101216/dff21102/attachment.htm>


More information about the Haskell-Cafe mailing list