and actually not until `builtins.mergeio`.
I would have liked to delay typechecking in IOSource.hs altogether, but
it being forced somewhere that was not immediately obvious to me.
This shouldn't impact anyone who already has `.base` or some other copy
of the io primitives, and the upshot is saving some time on transcripts.
`builtins.merge` will give you everything that's in `Unison.Builtin` and
`Unison.Builtin.Decls`, `builtins.mergeio` will give you those plus the
stuff in `Unison.Runtime.IOSource`.
- shuffled and cleaned up imports and exports in FileCodebase
- made codebasePath a hidden implementation detail of FileCodebase
- tweaked decodeFilename in probably unreachable case
- eliminated redundant codebase initialization
- CopyFilterIndex:
- not including transitive dependents in the indices
- not calling `decodeFileName`
- `decodeFileName` incorrectly handling strings with $ later
- accidentally calling `doesDirectoryExist` instead of `doesFileExist`
- CopyRegenerateIndex:
- accidentally calling `doesDirectoryExist` instead of `doesFileExist`
- wasn't calling `Type.removeAllEffectVars` before indexing type
Put most into FileCodebase.Common due to cyclic imports.
Would like to do a tighter cleanup, but too hard.
When we're under less pressure, we could do proper benchmarks of these
with Criterion or something, my hand-done results have been confusing.
For #1385 (missing dependencies on push), I think we should use an
approach like the new sync algorithms use, where we use State to collect
dependencies as we traverse the Branch.
I will add the fix to all three, and then I think we can merge this even
though we will still be using the old algorithm for now.
After fixing this, some serialization round trip tests started failing. This ended up being due to the Eq instance for ABT being busted due to its use of rename, which has a subtle variable capture bug that @dolio spotted a while ago https://github.com/unisonweb/unison/issues/1277#1277 needs a proper fix but in the meantime, I've tweaked the Eq instance to be a bit more efficient and also avoid the #1277 bug in this particular case.