[Haskell-cafe] MonadReader laws
Roman Cheplyaka
roma at ro-che.info
Sun Feb 17 11:33:04 CET 2013
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
More information about the Haskell-Cafe
mailing list