A better type signature for `forM_`

Michael Snoyman michael at snoyman.com
Fri Apr 1 03:34:42 UTC 2016

For what it's worth, we made that change in mono-traversable already,
although the primary motivation was performance, not safety.


On Fri, Apr 1, 2016, 2:37 AM Artyom <yom at artyom.me> wrote:

> For me the convenience of for_ (without having to use void) is more
> important than increased safety, but I accept that others’ needs are
> different – sometimes avoiding such nasty surprises is incredibly
> important, sometimes not so, and it depends both on the developer and the
> project.
> In an ideal world it’d probably be an optional warning (which I’d be able
> to disable, just like I do with fwarn-unused-do-bind), but I have no idea
> how hard it would be to implement and I can't imagine how it might look
> anyway.
> Bottom line: if it will result in an error and not a warning (i.e.
> changing the type of mapM_/forM_/for_, as originally proposed), I’m
> mildly against this idea.
>> _______________________________________________
> 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/20160401/792d042a/attachment.html>

More information about the Libraries mailing list