Created Started Cancelled
By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Let ListLit be skipped by the call its list is an argument of
A list literal whose elements are the pieces of a message is a list nobody
asserts the elements of, so every one of them is a mutant that can only be
killed by pinning wording. There was no way to say so short of turning the
operator off everywhere: ListLit read no config at all, and the one targeted
key in the family, ConstEmptyList's skip-strings, tests whether the element
type is Char and so does not see a list of strings.
So ListLit now reads skip-calls-to, naming the calls whose arguments it leaves
alone:
operators:
ListLit:
skip-calls-to:
- logInfo
- fail
Any enclosing call counts, not only the immediate one. That is the whole point
rather than a generalisation for its own sake: the call a message's list
literal is the immediate argument of is always mconcat or unwords, never the
function that says what the message is for. In `fail $ mconcat ["unknown: ",
x]` it is fail that makes the list a message, and it is two applications out.
The walker therefore carries the calls an expression is inside, innermost
first, pushed when it descends into an argument. $ is seen through on both its
paths: the HsApp chain the typechecker expands it into, whose head is $ rather
than the function, and the OpApp it can still be.
Example.ListLitCallsLib exercises it, through both the direct and the $ form,
and nix/mutation.yaml names its report function. Without the entry the example
check reports those two list literals; with it they are gone and the module
generates nothing.