- `Transcript` – the data model
- `Transcript.Parser` – the parser and printer
- `Transcript.Runner` – the runner
There is unfortunately still some printing tightly coupled to the
runner, but this makes it more obvious. Also, the runner is the only
component tied to the CLI.
A bunch of small changes in TranscriptParser
- remove dead code
- don’t use `Show` for formatted output
- put processed blocks in a separate sum type from unprocessed blocks
- remove `Transcript` from identifiers (changed importers to use
`qualified as Transcript`)
- deduplicated some error reporting
And one happy fix, IMO – got rid of the `Text.init` that plagued me in
Almost everywhere we produce a `Reference` for numbered args, we also have a
`HashQualified Name` handy, which is much more consumable by commands.
The only case we don’t have an `HQ` is in the `todo` command output, so that now explicitly builds
a `HQ.HashOnly`.
This also fixes an issue with `StructuredArgument` handling where `alias.term`
and `alias.type` wouldn’t make an alias to a `HQ.HashOnly` `StructuredArgument`.
Fixes#4898.
With `OverloadedStrings` enabled globally and an `IsString` instance, the
`newtype` was rendered useless.
This extracts the `NameSegment` constructor/eliminator to a `.Internal` module,
has `Unison.NameSegment` only re-export the type, and moves the `*Segment`
members to `Unison.Syntax.NameSegment`.
This forces cascading changes, including eliminating a bunch of magic literals
scattered throughout the code.
This is the first step toward avoiding printing/parsing the values provided via
`NumberedArgs`. It simply adds a new sum type to hold all of the types that can
be in numbered args and stores it alongside the `Text` representation.
It currently gets discarded when we actually expand the arguments.