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 3s 2s 2s 5s 3s
Eval 5s 29s 29s 34s 0s
Build 22s 24s 15s 38s 0s
Suite 3s 55s 34s 38s 3s

Timeline

0s10s20s30s