By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Self-weed: report unused configured roots, root-instances and root-modules Weeder now reports configuration entries that no longer match anything, treating stale roots as weeds in their own right (issue #154): * a `roots` pattern that matches no declaration, * a `root-instances` entry that matches no instance, and * a `root-modules` pattern that matches no module. These print alongside the regular weeds and contribute to the weeds-found exit code. Only entries the user explicitly configured are reported -- defaults (`Main.main`, `^Paths_.*`, `IsString`/`IsList`) are left alone, since flagging a default the user never wrote is not actionable. Provenance is tracked by a `Configured` wrapper on the three root fields, set from whether the TOML field was present. A `roots` pattern counts as matching if it names any declaration defined in the analysed modules (`localDeclarations`), not merely an outputable one, so a root naming a real type or constructor is not flagged just because `unused-types` is disabled; a root matching only an external symbol still is. When `type-class-roots` is set, `root-instances` is ignored entirely and so is never reported. To name the offending entry, compiled patterns carry their source string (`CompiledRegex`), and reachability and dead-root detection share a single `matchesInstancePattern` predicate. Adds SelfWeeding and DefaultsNotReported integration tests; no existing golden output changes.