Proposal: Warn about ArrowLoop instance for Kleisli Arrows
Heinrich Apfelmus
apfelmus at quantentunnel.de
Tue Oct 25 14:47:37 CEST 2011
Heinrich Apfelmus wrote:
> I recently noticed that the instance
>
> MonadFix m => ArrowLoop (Kleisli m)
>
> does not fulfill the ArrowLoop laws for most monads, rendering it either
> useless or dangerous for the unwary. Removing it would be the correct
> thing to do, but I think that the sensible thing to do is to merely
> document said fact at the instance declaration in the haddocks.
>
> [..]
> Discussion period: 2 weeks (ends 24 October 2011)
The discussion period has ended and it seems to me that there is
unanimous support for this documentation change.
The following formulation seems best to me:
"Every monad that supports 'mfix' can be made an instance of
'ArrowLoop'. But for many monads (those for which the '>>='
operation is strict) this instance will /not/ satisfy the
right-tightening law required by the 'ArrowLoop' class. Use these
instances at your own risk."
What exactly do I have to do to move this towards inclusion in the base
libraries? Make a track ticket? And then?
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
More information about the Libraries
mailing list