2f06d36f

Created Started Finished

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

Report an executable that holds more than one line

HsAppOnlyMain, at the package level, over the two ways an executable's own
source can hold more than the line it exists to write: a declaration beside
main, and a main that does the work itself rather than naming the function
that does.

At the package level because the question is which component claims a module,
and a component is a package's answer rather than a module's. Extraction reads
every module and the rule asks about the executables, so what the store holds
is what the source said.

The declaration list is what says what is there, so the only thing read out of
the parse tree is what main's right-hand side does: a do-block, a lambda, a
case, an if or a let anywhere in it, or a guard, a where clause, an argument or
a second equation on the binding. A type signature is not counted, because it
cannot be moved on its own and the binding it belongs to is reported already.

Zero findings in this repository and zero in nix-ci: both write the one line
already, which is what puts the rule in the guards milestone rather than the
layout one.