2da519c9

Created Started Finished

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

Stop sorting matchers that cannot be out of order

The normaliser sorted a selector's matchers before comparing two parse trees,
which it cannot ever have needed to do.  Both sides of every comparison are
one expression put through two renderers, and all three go through the same
renderSelector, which writes the matchers in the order the selector holds
them.  There is no path by which the two sides differ.

It came from the script that compared the old Nix dashboards against the new
Haskell ones, where the two sides were built by different generators and the
order genuinely did differ.  Carrying it here carried the reason for it away.

Checked by deleting it and running every property two thousand times rather
than a hundred.

What is left, dropping the parenExpr nodes, is load-bearing: one of the two
spellings is deliberately bracketed at every step, so the brackets are exactly
what has to go.  It walks the JSON because there is no typed tree on that side
to walk, which the Haddock now says.