- 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`?
Previously, we were very sloppy, sometimes using the Ord instance for things displayed to humans, when that is only sometimes kinda sorta what you want. Separating this out into its own class lets us be careful about this and handle it uniformly.