[Haskell-cafe] Trouble using State Monad.

Jake McArthur jake.mcarthur at gmail.com
Mon Oct 10 14:08:08 CEST 2011


On Oct 9, 2011 11:17 PM, "David Barbour" <dmbarbour at gmail.com> wrote:
> If you really want the input type to be part of the Filter type
definition, you'll need to use arrows instead of monads.

I wouldn't say that. You just need an extra type parameter. That doesn't
mean it can't be a monad. In fact, wrapping ReaderT around the existing
representation gives us exactly the monad we probably want. That said, I
think it is likely to be more useful in this context either as it is or as
an arrow. I just want to point out that it can still be a monad even if it
is an arrow.

- Jake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111010/51d06db1/attachment.htm>


More information about the Haskell-Cafe mailing list