Issue 1988 Enable -fwarn-unused-do-bind

Title Enable -fwarn-unused-do-bind
Priority bug Status resolved
Milestone 2.8.0 Resolved in 2.8.0
Superseder Nosy List dmitry.kurochkin, kerneis
Assigned To
Topics Devel

Created on 2010-11-04.13:43:38 by kerneis, last changed 2010-11-21.22:25:39 by noreply.

msg12902 (view) Author: kerneis Date: 2010-11-04.13:43:37

The following warning is disabled in darcs.cabal: -fwarn-unused-do-bind.

It should be activated, because unused bind in do blocks might hide
errors.  For instance, while resolving issue332, I wanted to change a
function throwing an exception into a function returning IO(Either). 
With the warning disabled, ghc does not tell me where this function is
used, which means I have to use grep, cross fingers and hope I do not
miss any error case.

Currently, this warning triggers 343 times when building darcs.  Who
knows how many bugs are hidden in this crowd?

Of course, enabling the warning is easy but it is essential to fix the
warned cases, in order to get something usable.  This requires a
collective effort, because I think no one could bear fixing more than a
few dozen of warnings at once.

Best regards.
msg12958 (view) Author: kowey Date: 2010-11-09.16:44:03
On Thu, Nov 04, 2010 at 13:43:38 +0000, Gabriel Kerneis wrote:
> Currently, this warning triggers 343 times when building darcs.  Who
> knows how many bugs are hidden in this crowd?

I wonder if we can ask hlint to provide these warnings instead.

Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:kowey@jabber.fr (Jabber or Google Talk only)
msg12980 (view) Author: kerneis Date: 2010-11-10.09:18:01
It wouldn't solve the point patch446 is trying to address: avoiding
*new* patches to introduce such warnings.  People compile their code,
but do not necessarily run it through HLint.  They will see GHC warnings
(because they are very few of them) but could miss those produced by
HLint (because they are so many of them). 

It could be added to HLint of course, but IMO this patch would still be
msg13190 (view) Author: noreply Date: 2010-11-21.22:25:38
The following patch sent by Gabriel Kerneis <kerneis@pps.jussieu.fr> updated issue issue1988 with
status=resolved;resolvedin=2.8.0 HEAD

* resolve issue1988: enable warn-unused-do-bind 
Ignore-this: 1833a27ec8dac960764a6e3ffdbd04e7

This patch enables warn-unused-do-bind and silences the 163 warnings of
that kind spread accross darcs code.

Please note that that this patch has been automatically generated by a
shell script.  It does not change or break anything, but might silence
warnings which are actual bugs.
Date User Action Args
2010-11-04 13:43:38kerneiscreate
2010-11-04 13:53:34koweysettopic: + Devel
2010-11-09 16:44:03koweysetmessages: + msg12958
2010-11-10 09:18:02kerneissetmessages: + msg12980
2010-11-21 22:25:39noreplysetstatus: unknown -> resolved
messages: + msg13190
resolvedin: 2.8.0