Roman Cheplyaka | 17 Feb 11:33 2013

MonadReader laws

Has anyone formulated a reasonable set of laws for MonadReader?

The instances for continuation-based monad transformers contradict any
intuition about local and ask.

E.g. for LogicT:

  > flip runReader 1 $ observeAllT $ local (const 2) ask
  [1]

  > flip runReader 1 $ observeAllT $ local (const 2) mzero <|> ask
  [2]

I wonder whether there are any real use cases for such instances
(and, consequently, whether they should be removed).

Roman

Gmane