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

David McBride toad3k at gmail.com
Mon Apr 22 15:29:47 CEST 2013


The vast majority of people use the first form.  I guess the second form
would be used if void were in prelude but it isn't, so no one does.


On Mon, Apr 22, 2013 at 7:41 AM, harry <voldermort at hotmail.com> wrote:

> I have some monadiccode of the form:
>   foo >>= something >>= bar >> return ()
>
> HLint is telling me to change this to:
>   void (foo >>= something >>= bar)
>
> Why is the second form considered better? I actually find the original to
> be
> clearer.
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130422/1eeee4ba/attachment.htm>


More information about the Beginners mailing list