FunctorFix

David Feuer david.feuer at gmail.com
Thu Sep 7 02:21:57 UTC 2017


I think you'll at least have to specify that g is lazy, because f may let
its argument "leak" arbitrarily into the return value of the action it
produces. But I don't have a clear sense of whether this is a good law
otherwise.

On Sep 6, 2017 10:04 PM, "Wolfgang Jeltsch" <wolfgang-it at jeltsch.info>
wrote:


While we are at pure right shrinking, let me bring up another question:
Why is there no general right shrinking axiom for MonadFix? Something
like the following:

Right Shrinking:

    mfix (\ ~(x, _) -> f x >>= \ y -> g y >>= \z -> return (y, z)) >>=
return . snd
    =
    mfix f >>= g

Can this be derived from the MonadFix axioms? Or are there reasonable
MonadFix instances for which it does not hold?

All the best,
Wolfgang
_______________________________________________
Libraries mailing list
Libraries at haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170906/9a52c633/attachment.html>


More information about the Libraries mailing list