47628b0a

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

Self-weed: report unused configured roots, root-instances and root-modules

Weeder now reports configured `roots` patterns, `root-instances` entries
and `root-modules` patterns that match no identifiers, treating stale
configuration as a weed in its own right (issue #154).

A `roots` pattern is only considered unused when it matches no identifier
Weeder is aware of at all (`allDeclarations`), not merely no outputable
declaration -- so a root naming a real type or constructor is not flagged
just because `unused-types` happens to be disabled.

Only entries the user explicitly set are reported; defaults are left
alone, since flagging an unconfigured default as unused is not
actionable. When `type-class-roots` is set, `root-instances` is ignored
entirely and so is never reported.

To name the offending entry in the output, compiled patterns now carry
their source string (`CompiledRegex`), and `ConfigType` records whether
each root section was explicitly configured.

Adds a SelfWeeding integration test. No existing golden output changes.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 34s 2s 2s 36s 34s
Eval 38s 4m07s 17m47s 18m26s 1s
Build - - - - -
Suite 34s 4m09s 17m51s 18m26s 14m16s