Draft: Make: Name GHC according to the stage it is *built* in, not used in.
The basic reason is that is the modular thing to do: where there is one canonical predecessor stage, there are be many possible successor stages. It would be arbitrary to just name the newly built GHC after one of them.
That means we have:
-
distdirs decremented:
stage0
,stage1
, andstage2
-
prog names decremented:
ghc-stage0
,ghc-stage1
,ghc-stage2
-
Stage1Only
->Stage0Only
-
in the test suite,
STAGE<N+>
toStage<N>
However, GHC_STAGE0
already meant the GHC used for stage1 -- there was
no missing 0 so we could decrement losslessly. We instead named
GHC_STAGE<N>
HC_STAGE<N>
to match CC_STAGE<N>
and friends (which
are similarly abstractly named) because they are all morally parameters,
not results, and added a comment explaining.
This is very hard to review, but one thing that might help is the fish one-liner:
git diff (for x in HEAD^ HEAD; git grep 'stage[0123]' $x | sed -E 's/^HEAD\^?://' | psub; end)