056feb79

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.