Created Started Cancelled
By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Let a constructor say what a list is for skip-calls-to reads the call an expression is inside, and a data constructor was not one of them. A codec or a database column rejecting what it was handed says so by returning a Left of a message assembled from pieces, so the constructor is exactly the call that says what the list is for, the same way fail or error does one application further out. Read in the enclosing-call recording rather than in headFunctionName. Several operators use that function to decide what is an elidable or a swappable call, and a constructor is neither, so teaching it about constructors would change which mutants those produce. The new calleeName falls back to the constructor's name at the ConLikeTc node GHC rewrites a constructor's HsVar into, which is the same node BoolLit, ConstBool, MaybeOp and ConstConstructor already read. Without this, a message inside an instance method could only be answered by asserting its wording in a test, because there is no binding for an ANN pragma to name. In the repository this came from that was eight messages, and working around it took eight extracted functions, eight pragmas and seven ElideCall entries; one Left entry replaces all of it. Example.ListLitCallsLib.reportEither is the case, and it is asserted both ways: removing the Left entry fails the check with the ListLit and ConstEmptyList mutants on its message, and putting it back passes.