When adding arguments to the instruction for bug/todo output, some other
uses of throwing errors were neglected and passed the wrong number of
arguments. This change also customizes the error messages a bit
(although they do not quite match the old messages).
In addition to the whole term for a combinator, each floated expression
is remembered so it can be used in decompilation when they are partially
applied.
- The old floater would float even
x -> e
into:
let f x = e
f
which is quite unnecessary.
- It is also unnecessary to float a lambda immediately in the body of a
let rec, because the entry point for a compiled let rec can take
variables.
- The old floating behavior was essentially ensuring that lambda
expressions could not be decompiled (currently), because they are
turned into references to internal bindings of a top level combinator.
- Note that the transcript change is because we are serializing a
different value, not because serialization has changed.
If there weren't any matches in the first directory searched,
it was stopping with "hmm ... no test results recorded",
so we skip to the next test set if there are no transcripts
found.
- The array-based data type values store their contents in the same
order as the stack, which grows toward increasing array indices. This
means that fields are actually stored in reverse order. But the DataC
auxiliary functions were assuming they were in order. This was only
really visible via decompilation (or observing the binary
representation of serialized vlaues).
- The new runtime should pass the existing transcripts, so this was an
oversight. Running this test with `--new-runtime` would previously
just do an identical set of tests, using the old runtime for most
transcripts and the new runtime only for things in the specific new
runtime directory.
This also moves from ghc 8.10.3 to 8.10.4.
My main motivation was making some versions line up for a newer
packaging of haskell-language-server, but it seemed like it might
generally be good to move from a nightly to an lts version?
Resolves#1648.
Technically I think that this has slightly different RNG characteristics
than the old implementation, but I wouldn't expect it to matter for
the sake of the test.
Before this change, when I ran the tests I got the following "hints"
printed to the console:
```
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
```
I think that this means that the tests could potentially fail, depending
on the user's local git config and/or version.
I tried using the `trunk` branch and the tests failed. It seems that
the tests are dependent on the `master` branch being used, so I figured
it was probably be best to explicitly specify that branch name.