354de1fa

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

Refuse a second anonymous scalar in a positional constructor

A domain scalar is named by a record field or by a newtype of its own,
and the half of that already reachable was the synonym, which
HsNewtypeNotSynonym refuses. Nothing reached the commoner shape: a bare
Text, String or Int sitting in a positional constructor with no field
and no type naming it, which is exactly what the guide means by a scalar
that can be confused positionally.

The budget is one rather than zero because a constructor holding a
single primitive names it, which is how every error type in this
repository is written, and a relayed reason or a count that is a count
travels anonymously on purpose. A second primitive is named nowhere, so
a caller that has the two the other way round still typechecks.

Measured over 2330 modules of nix-ci, smos, sydtest, centjes, intray and
this repository: thirty-nine constructors over the budget, and none of
them here, so the rule ships with nothing to clean up.

Total

9s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 0s 0s 0s 0s
Eval 1s 8s 8s 9s 0s
Build 7s 0s 1s 9s 0s
Suite 0s 9s 9s 9s 0s

Timeline

Config Eval Build
0s