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

Brent Yorgey byorgey at seas.upenn.edu
Mon Dec 13 21:30:54 CET 2010


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.

-Brent



More information about the Haskell-Cafe mailing list