4245048a

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

RuleImpl is a sum of products, not a GADT

It never was one: no constructor refines the result type, they all return plain
RuleImpl. What needs an extension is the existential type each rule carries,
and GADTs implies ExistentialQuantification, so the bigger extension was doing
the smaller one's job under the wrong name. The narrower one says what is
actually happening, and the declaration reads as the sum type it is.

The three constructors carry records now rather than positional fields, so the
codec, the extractor and the check have names.

DeriveFunctor goes too. Functor was derived on the three view types and never
used.

Also correcting a measurement. The 5.4s recorded for building one package's
facts counted the cache upload as build time; about three and a half seconds of
it was uploading. Measured with --post-build-hook true, --no-substitute, and a
salt in the derivation name so the timed run is a real build:

    an empty derivation            0.39s
    one package's output           2.01s
    the whole repo, one process    3.85s

So the overhead is about four tenths of a second per derivation rather than the
unit of caching costing more than the whole job. The conclusion changes with
it: the split pays when one package changes and the rest stay cached, and Nix
charges 0.4s per derivation to ask. The measurement command is in CLAUDE.md now,
because getting it wrong once was enough.