
15 Dec
2015
15 Dec
'15
5:43 p.m.
I realized this does not quite satisfy the law
pure x >>= f = f x
In particular,
pure () >>= (\() -> m) :: Backwards m
is a divergent computation whenever m is a "strict" monad. Things seem
somewhat nicer when m is "lazy", but there could be further problems
I've overlooked.
On Tue, Dec 15, 2015 at 2:20 PM, David Feuer
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.