> This bug could have been caught by a very simple static analysis that
> is very popular in the logic programming community: singleton variable
> warnings.  In the code above, the variable `v2' occurs only once.
> Singleton variables such as this are often bugs.  For cases where the
> programmer really does want a singleton variable, the warning can be
> suppressed by using a different naming convention (in Prolog, it
> would be `_v2'; since Haskell doesn't allow leading underscores,
> I suppose you could use `v2_').

OK, OK, the next release of GHC will (if you ask it) report
unused imports and bindings, and report shadowed bindings too.

Simon

Reply via email to