[Haskell-beginners] HLint: use void instead of return()

Kim-Ee Yeoh ky3 at atamo.com
Mon Apr 22 18:18:12 CEST 2013


On Mon, Apr 22, 2013 at 8:29 PM, harry <voldermort at hotmail.com> wrote:

> So when is void better?
>

The short answer is when you have a single quux. Then void quux is probably
more natural than quux >> return ().

Not having read hlint's code, my guess is that hlint is blindly flagging
instances of blahblah >> return (). Implementing this single quux condition
may only be a tweak away, and I'm inclined to think the maintainer would
happily accept the patch.

Nevertheless David has a good point about void not being in the prelude.

Also, too many void's in the code raises alarm bells for me.

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130422/4958a0a9/attachment.htm>


More information about the Beginners mailing list