1323c04e

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Report an argument named only to be taken apart

HsLambdaCase, at the module level, over both shapes the guide names: one
equation that names its last argument and then cases on it, and one equation
per pattern with the function's name repeated in each. hlint covers neither, so
the rule stays a check of its own rather than a delegation.

The name is what is reported rather than the equations. A where-bound helper's
equations reach to the end of its own where clause, so they contain the
bindings written in it, and a finding drawn over another finding reads as one
thing to fix rather than as three.

Both shapes err towards silence. An equation that takes an earlier argument
apart, or names it differently from its neighbour, is doing something one
\case cannot say. A last argument whose name is written anywhere else in the
equation is a name with a use, and any occurrence of the spelling counts,
shadowing included, because deciding which occurrence is which is renaming.

Fourteen findings in this repository, all fixed here. Seventy-nine in nix-ci,
nineteen of them the named-and-cased shape and sixty the multi-equation one.

Total

1m09s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 0s 0s 0s 0s
Eval 0s 25s 25s 26s 0s
Build 17s 1m54s 52s 1m09s 0s
Suite 0s 2m21s 1m09s 1m09s 0s

Timeline

Config Eval Build
0s10s20s30s40s50s1m