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

Kim-Ee Yeoh ky3 at atamo.com
Mon Apr 22 15:20:42 CEST 2013


In corner cases like this, it really looks like six of one, half dozen of
the other.

In other words, feel free to ignore hlint when you need to. The heuristics
aren't tuned to be 100% perfect.

-- Kim-Ee


On Mon, Apr 22, 2013 at 6:41 PM, 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/1de4aeb8/attachment.htm>


More information about the Beginners mailing list