
9 Oct
2011
9 Oct
'11
7:03 p.m.
Heinrich Apfelmus writes:
Thus, I suggest to add documentation to the instances, along the lines of "Even though every monad that supports 'mfix' can be made an instance of 'ArrowLoop', it usually /does not/ fulfill all of the corresponding ArrowLoop laws. Use this instance at your own risk."
The main problem is the right-tightening law
loop (first h <<< f) = h <<< loop f
which fails for most monads.
We could be more specific: "For many monads (those for which the '>>=' operation is strict) this instance will not satisfy the right-tightening law."