With the switch to `cmark`, the “second phase” parsing of individual
stanzas omitted an EOF check to ensure that the entire stanza had been
parsed. This resulted in parses where we end up with truncated sets of
UCM commands or API requests, which could either result in premature
success or failures occurring later in the transcript, where they’d
complain about the wrong thing.
The recently added `.editorconfig` sets a max line length of 120 characters for all file types. I found this to be
pretty frustrating when writing Unison scratch files. While writing Unison code my editor would seemingly randomly
create a new line, generating invalid Unison code. This came up more often when writing `Doc` values, since I tend to
write longer lines in prose than in code.
The formatting in scratch files is ephemeral, so I don't think that there is any good reason to force a max line length
on it.
With #5142, Ormolu was upgraded from 0.5.2.0 to 0.7.2.0. This formats
the codebase to avoid spurious formatting comingled in other commits.
Almost all of the changes are simply wrapping single constraints in parens, like
```diff
-hashBranch :: forall m. Monad m => Branch m -> m BranchHash
+hashBranch :: forall m. (Monad m) => Branch m -> m BranchHash
```
There is also some reordering of language pragmas and imports,
indentation correction (some of which gets precedence wrong), and switching
some Haddock from `-- ^` to `-- |` .
- `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