[Haskell-cafe] Does Backwards admit a Monad instance?

David Feuer david.feuer at gmail.com
Tue Dec 15 19:20:24 UTC 2015


In particular, I'm thinking about

instance MonadFix m => Monad (Backwards m) where
  m >>= f = Backwards $
    do
      fin <- forwards (f int)
      int <- forwards m
      return fin

It looks to me like this should be valid, and compatible with the
Applicative instance, but maybe I'm missing something.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151215/38bf02e1/attachment.html>


More information about the Haskell-Cafe mailing list