Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Doc v1 transcripts to v2 #5253

Draft
wants to merge 483 commits into
base: 24-06-21-delete-old-doc-support
Choose a base branch
from

Conversation

sellout
Copy link
Contributor

@sellout sellout commented Jul 24, 2024

This does a very superficial conversion – it doesn’t correct all of the verbiage that describes how to do things in v1, just changes the actual syntax.

It also merges in trunk, for the ProjectPath changes.

ChrisPenner and others added 30 commits June 26, 2024 17:23
aryairani and others added 28 commits July 16, 2024 03:29
So my editor stops fixing things for me.
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
- `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.
Mostly formatting, but also
- removes Apple’s Cocoa from the dependencies,
- moves some dependencies from `buildInputs` to `nativeBuildInputs`.
This tool manages the Unison cache, so it’s useful to provide in dev
environments. Actually pushing to the cache requires a secret key.
required if compiling on systems that use eg libressl
this is more portable and ensures we can compile on systems without bash (eg *BSD)
…ix-systems

Support native compilation on non-GNU Unix systems
With unisonweb#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 `-- |` .
Changing `(A x) => (B y) => x -> y` to `(A x, B y) => x -> y`.
This adds a .ormolu file to tell Ormolu what some operator precedences
are, to improve indentation of multi-line operator sequences.
This does a very superficial conversion – it doesn’t correct all of the
verbiage that describes how to do things in v1, just changes the actual
syntax.

```unison
escaping = [: Docs look [: like \@this \:] :]
escaping = {{ Docs look --doc open-- like --amphora--this --doc close-- }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn’t sure how to convert this bit – AFAICT, there’s no support for escaping characters in Doc v2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants