c4ea0c8b

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

Mutation: accept fully-qualified names in ignore and operator configs

The `ignore` filter previously matched only the bare OccName, and the
per-operator `skip-calls-to` configs matched only the bare name or the
name's defining module.  Neither let a user qualify a re-exported
function by the module they actually import it from
(e.g. `Data.Set.union`, defined in `Data.Set.Internal`).

Add `nameMatchCandidates`, built on the module's GlobalRdrEnv, which for
a name offers: the bare OccName (matching any module), the
defining-module qualification, and a qualification for every module the
name is imported through (from the GRE's import provenance).  Route the
ignore filter and RemoveAction's two ignore checks through a shared
`headNameMatches` helper, and have SwitchFunctionArguments and ElideCall
use the same candidate set.  Both helpers take the GlobalRdrEnv, threaded
from `instrumentEnvRdrEnv`.

Add `opName` (the Name-returning sibling of `opOccName`, now defined in
terms of it) to recover the head's module.

Exercise all three forms in nix/mutation.yaml and Example.IgnoreLib:
`mark` bare, `Example.IgnoreLib.markM` by defining module, and
`Control.Monad.Writer.censor` by import module (censor is re-exported
from Control.Monad.Writer.Class).  `censor` is used nowhere else, so the
global ignore entry cannot disturb other modules; the unchanged
IgnoreLib/ConstFnLib golden manifests are the regression test.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 0s 3s 3s 3s 0s
Eval 2s 40s 40s 43s 0s
Build 7s 56s 29s 36s 0s
Suite 0s 1m39s 42s 43s 0s

Timeline

0s10s20s30s40s