- moved everything that depended on V1 `Reference` into `FileCodebase` namespace, duplicating a lot of code for better or worse.
- pulled these into their own modules:
- Codebase (types) into `Codebase.Type`; `Codebase` module re-exports them
- `Codebase.Branch.Merge`,
- `Codebase.Branch.Names` (Branch shouldn't depend on `Names`)
- `Codebase.BuiltinAnnotation`
- `Codebase.Causal.FoldHistory`
- `Codebase.CodeLookup.Util` (remove `CodeLookup` dependency on `UnisonFile`)
- `Codebase.DataDeclaration.ConstructorId` trying to use this alias in relevant places
- `Codebase.Init`
- `CodebasePath`, the `FilePath` alias.
- `Lexer.Pos` (because `AnnotatedText`, `Range`, `Parser.Ann` shouldn't depend on the whole lexer)
- `Names.ResolutionResult` (`Type` shouldn't depend on `Names`)
- `PrettyPrintEnv.FQN`
- `PrettyPrintEnv.Names` (pulled out references to `Names` from `PPE`)
- `PPE.Util` not 100% sure what's happening here
- `PrettyPrintEnvDecl` pull this data type and supporting functions into separate module
- `Path.Parse` (`Path` shouldn't depend on the lexer)
- `Path.Convert`, `Path.Parse` into `Unison.Util.Convert`
- `Parser.Ann` (`Codebase`, etc. etc. shouldn't depend on `Parser`)
- `Referent'` (`SyntaxText`/`ColorText` shouldn't depend on `Reference`)
- `Referent` module re-exports stuff from `Referent'`, hard-coded to `Reference`.
- removed `SyntaxText.SyntaxText`
- `TermEdit.Typing` (because `TermEdit` shouldn't depend on the full typechecker)
- `UnisonFile` / `TypecheckedUnisonFile` (types into `UnisonFile.Type`)
- `UnisonFile.Env`
- `UnisonFile.Error`
- `UnisonFile.Names`
- `Var.WatchKind`
- `Var.refNamed`
- Deleted unused `Codebase.Classes` typeclasses wip
- Deleted unused `Unison.Util.Menu`, ancient modal stuff
- Moved `Codebase.makeSelfContained` into `UnisonFile` module, since it deals with `UnisonFile` and not with `Codebase`.
- split up `GitError` into a more codebase-agnostic hierarchy (see `Codebase.Type.GitError`)
- changed `bindNames` to `bindReferences` in some cases; `bindNames` remains in `.Names` compatibility module
- move `Unison.Var.refNamed` into `Unison.Term`
- tweaked GitError to separate obviously codebase-format specific errors from non-obviously-corbase-format-specific errors.
- tweaked `Reflog.Entry` to support anything that's coercible to `Unison.Hash`, but also changed its kind
- removed `DebugBranchHistoryI` input because I didn't want to maintain its implementation
- removed `ShortBranchHash` dependency on `Hash`, and let it work on anything coercible to `Hash`. P.S./todo This class should be called ShortHash; the existing ShortHash is really a ShortReference!
- removed SyntaxText dependency on Reference
- cleaned up `Path` somewhat
- held off on:
- move `DD.updateDependencies`
- splitting up `Path` into the billion different components
- e.g. `Path` becomes `RelativePath`, `Path'` becomes `Path`, and `Absolute` wraps `RelativePath`
- `Split` / `Split'` maybe rename to `Path.NonEmpty`?
- rename `Branch.getPatch` / `.getMaybePatch`
- split out `Name.Parse`, `Name.Convert`, substitute a lot of specific functions like `Path.hqSplitFromName'` with `Convert.parse`.
- todo:
- clear unreferenced junk
- restore:
- `NameEdit`?
- `PatternCompat`?
- Unison.ABT.changeVars is not capture avoiding substitution, but was
being used as such.
- Sequence pattern compilation needs to make up variables sometimes, and
it may not have been avoiding all possible conflicts.
- Keeping track of abilities in the context allowed them to escape the
variable scoping rules necessary in the context. This would lead to
tryinig to unify types that aren't valid in the context.
- Instead, this patch threads the wanted abilities through the
synthesis and checking procedures, so that they can be pruned as
needed when variables go out of scope. Due to the way abilities can be
elided, even checking a type against a term may need to synthesize the
abilities needed in that term.
- The type checker has been refactored quite a bit as part of this
rework, mainly trying to eliminate large functions nested inside a
where clause.
- Some tests/transcript still do not work. Most of them seem to be error
message related, with only a few errors related to tricky type
checking cases.