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
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
483 commits
Select commit Hold shift + click to select a range
61b2666
Temporarily ignore deprecations from jose
ChrisPenner Jun 27, 2024
4a9b358
Swap from x509 to crypton-x509 since old packages are abandoned
ChrisPenner Jun 27, 2024
61e0522
Fix redundant liftA2 imports
ChrisPenner Jun 27, 2024
745660d
Fix servant request stuff
ChrisPenner Jun 27, 2024
a7f234a
Use random token rather than NanoID
ChrisPenner Jun 27, 2024
f3d4455
Update opt-parse help
ChrisPenner Jun 27, 2024
7538111
Upgrade watch expression stuff
ChrisPenner Jun 27, 2024
b85bea8
Clean up stack.yaml pins
ChrisPenner Jun 27, 2024
87e15d7
Bump stack version in CI
ChrisPenner Jun 27, 2024
06e730d
Attempt to bump nix flake
ChrisPenner Jun 27, 2024
8292786
Merge pull request #5140 from sellout/numbered-test-results
aryairani Jun 27, 2024
725a13b
Merge remote-tracking branch 'origin/trunk' into topic/jit-cont
dolio Jun 27, 2024
1a753ff
Group test results by definition
sellout Jun 27, 2024
4d8fa73
Merge pull request #5139 from unisonweb/24-06-26-delete-type-force
mitchellwrosen Jun 27, 2024
f824743
Merge pull request #5144 from sellout/group-test-results
aryairani Jun 27, 2024
df9e781
in delete.md, replace uses of merge.old with debug.alias.{term,type}.…
mitchellwrosen Jun 27, 2024
831c2e0
in diff-namespace.md, replace uses of merge.old with debug.alias.term…
mitchellwrosen Jun 27, 2024
d9618f7
in name-selection.md, replace use of merge.old with debug.alias.term.…
mitchellwrosen Jun 27, 2024
d1f2d78
in update-on-conflict.md, replace use of merge.old with debug.alias.t…
mitchellwrosen Jun 27, 2024
c97d93e
lsp 2.3.0.0
neduard Jun 27, 2024
a35d706
Use GHC.IsList
neduard Jun 27, 2024
95a0eb9
cleanup cabal
neduard Jun 27, 2024
c1bd940
Bump share dependency
dolio Jun 27, 2024
47a3a01
Fix up api transcripts
ChrisPenner Jun 27, 2024
384083e
Revive strangely deleted bits of merge.md
ChrisPenner Jun 27, 2024
b6b2adb
Resolve merge conflicts with trunk
ChrisPenner Jun 27, 2024
4b7cf99
Fix fix5080 pulling over the network
ChrisPenner Jun 27, 2024
658d490
Transcript update
dolio Jun 27, 2024
d45563e
Disable continuation annotation until it's actually useful
dolio Jun 27, 2024
937ac50
Don't pull base in docs.to-html
ChrisPenner Jun 27, 2024
c206059
Merge pull request #5078 from unisonweb/cp/use-projects-in-transcripts
mergify[bot] Jun 27, 2024
c3fe983
Merge neduard's lsp fixes
ChrisPenner Jun 27, 2024
5dcc096
update transcripts
ChrisPenner Jun 27, 2024
ce3c2dc
don't output nothing when there's nothing to do
mitchellwrosen Jun 27, 2024
e94f870
Remove Primes from module names
ChrisPenner Jun 27, 2024
563e148
Resolve conflicts with trunk
ChrisPenner Jun 27, 2024
7fd9b65
⅄ trunk → todo-empty
mitchellwrosen Jun 27, 2024
a76bca1
re-run fix2254.md
mitchellwrosen Jun 27, 2024
8f694f1
Add note about deprecations
ChrisPenner Jun 27, 2024
15f236a
Add issue number
ChrisPenner Jun 27, 2024
8a04bf4
Merge remote-tracking branch 'origin/trunk' into topic/jit-cont
dolio Jun 27, 2024
907aba9
Rerun jit tests with regenerated file
dolio Jun 27, 2024
121d51c
Don’t export packages for individual build tools
sellout Jun 27, 2024
d0f4c70
Remove the non-haskell.nix devShell
sellout Jun 27, 2024
01e0351
Switch `nixos-unstable` to `release-23.11`
sellout Jun 27, 2024
a5b9864
Don’t hide `unison-project` in an overlay
sellout Jun 27, 2024
ba13de4
Remove dead code
sellout Jun 27, 2024
86819b8
Remove reference to non-existent Cabal component
sellout Jun 27, 2024
110b5ca
Actually cache UCM in CI
sellout Jun 27, 2024
f25af69
Override tool versions directly in the package set
sellout Jun 27, 2024
dad9d6d
Minor simplification of haskell-nix-flake
sellout Jun 27, 2024
7b373d7
Eliminate `only-tools` devShell
sellout Jun 27, 2024
f2c8020
Can now include the devShells in `all` package
sellout Jun 27, 2024
5ae7963
Merge branch 'simplifying-nix' into cp/ghc-upgrade
sellout Jun 27, 2024
c47bdcf
Get Nix build working with GHC 9.6.5
sellout Jun 27, 2024
570db9b
Merge pull request #5152 from unisonweb/topic/jit-cont
aryairani Jun 28, 2024
0558509
Merge pull request #5147 from unisonweb/todo-empty
aryairani Jun 28, 2024
71eed21
Merge pull request #5146 from unisonweb/24-06-26-port-old-merge-trans…
aryairani Jun 28, 2024
d98b4ae
Port more transcripts to projects
ChrisPenner Jul 1, 2024
dadc4e4
Merge trunk and resolve basic conflicts
ChrisPenner Jun 27, 2024
0b8548f
Delete some out of date bits of transcripts
ChrisPenner Jun 27, 2024
38d60e7
Switch project before deleting it
ChrisPenner Jun 27, 2024
fce12cb
Work on fixing some transcripts for projects
ChrisPenner Jun 27, 2024
5f78557
Solve conflicts
ChrisPenner Jul 1, 2024
2002a56
Remove loose code support from api
ChrisPenner Jul 1, 2024
724dea4
Update api transcripts
ChrisPenner Jul 1, 2024
d93b5de
Update paths in branch-relative-path.md
ChrisPenner Jul 1, 2024
fbd7bb9
Update 'bug-strange-closure.md'
ChrisPenner Jul 2, 2024
081f344
Fix delete.md
ChrisPenner Jul 2, 2024
99bad76
Allow hashes or branches in diff.namespace
ChrisPenner Jul 2, 2024
b636068
Partially update diff-namespace
ChrisPenner Jul 2, 2024
6f19a87
Update merge.md and fix5129
ChrisPenner Jul 2, 2024
983fb05
Port move-namespace to projects
ChrisPenner Jul 2, 2024
f0c53ee
show "defs in lib" merge precondition violation in `todo` output
mitchellwrosen Jul 2, 2024
eb1ee64
merge unison-util-nametree into unison-core1
mitchellwrosen Jul 2, 2024
b8e13ca
⅄ move-nametree → 24-07-01-todo-merge-precondition-violations
mitchellwrosen Jul 2, 2024
55ad236
Update name-selection transcript
ChrisPenner Jul 2, 2024
e66b315
Partially translate names.md
ChrisPenner Jul 2, 2024
498e898
Update namespace-dependencies
ChrisPenner Jul 2, 2024
9af023b
Fixup resolution-failures.md
ChrisPenner Jul 2, 2024
c095003
Fix up tab-completion transcripts for project roots
ChrisPenner Jul 2, 2024
478545e
Rewrite view.md, still failing
ChrisPenner Jul 2, 2024
50f2881
add Names.lenientToNametree
mitchellwrosen Jul 2, 2024
7dbb365
Convert diff-namespaces.md to project-root
ChrisPenner Jul 2, 2024
e99fb07
Merge pull request #5174 from unisonweb/move-nametree
aryairani Jul 2, 2024
5c675df
Revive ability to delete root namespace
ChrisPenner Jul 2, 2024
287b4e0
⅄ trunk → 24-07-01-todo-merge-precondition-violations
mitchellwrosen Jul 2, 2024
6ae9f8b
Fix behaviour of branch command
ChrisPenner Jul 2, 2024
eaf233c
automatically run ormolu
ChrisPenner Jul 2, 2024
fdf91bb
make decl coherency check more abstract to support "get all violation…
mitchellwrosen Jul 2, 2024
e9f2aa3
Un-ignore transcript-parser-commands.md and fix it.
ChrisPenner Jul 2, 2024
2331c16
Mostly Fix up deleting the branch you're on
ChrisPenner Jul 2, 2024
cc07b63
Merge trunk
ChrisPenner Jul 2, 2024
1d5ae81
Include trailing '!' in identifier names for hover
ChrisPenner Jul 2, 2024
92a74df
automatically run ormolu
ChrisPenner Jul 2, 2024
54e17f2
Merge pull request #5175 from unisonweb/cp/trailing-bang-lsp
aryairani Jul 2, 2024
a74d4e8
Merge pull request #5172 from unisonweb/cp/more-project-transcripts
aryairani Jul 2, 2024
06b731b
report constructor aliases in `todo`
mitchellwrosen Jul 3, 2024
052fd51
report missing constructor names in `todo`
mitchellwrosen Jul 3, 2024
1857640
report nested decl aliases in `todo`
mitchellwrosen Jul 3, 2024
05d3402
report stray constructors in `todo`
mitchellwrosen Jul 3, 2024
8ff7e6d
⅄ trunk → 24-07-01-todo-merge-precondition-violations
mitchellwrosen Jul 3, 2024
1dab376
Fix behaviour of deleting last project or branch
ChrisPenner Jul 3, 2024
a7820fe
Deprecate root reflog behaviour in favour of project/branch reflogs
ChrisPenner Jul 3, 2024
7148685
Implement DB combinators for project and branch reflogs
ChrisPenner Jul 3, 2024
7f57612
More WIP on reflog commands
ChrisPenner Jul 3, 2024
2db50ad
Specialize 'fromHash' to CausalHash
ChrisPenner Jul 3, 2024
31874bd
Add reflog.global command
ChrisPenner Jul 3, 2024
8a405e0
Update reflog command WIP
ChrisPenner Jul 3, 2024
38a73da
switch `Left` to `Right` on help outputs; add draft transcripts
aryairani Jul 5, 2024
39179a3
switch `Left` to `Right` on help outputs; add draft transcripts (#1)
sellout Jul 5, 2024
4bbbc8c
move pretty-print helpers out of CommandLine.hs
aryairani Jul 5, 2024
111fc5e
Fix shared CLI error message
sellout Jul 5, 2024
67399e9
Make CLI error messages more consistent
sellout Jul 5, 2024
41a0da8
Fix formatting of an error message
sellout Jul 5, 2024
a7f1c24
Update transcript outputs
sellout Jul 5, 2024
0e76597
Merge remote-tracking branch 'upstream/trunk' into better-CLI-error-m…
sellout Jul 5, 2024
81f9458
Remove a help message from an error
sellout Jul 5, 2024
ddbfb35
Remove another warning flag from a message
sellout Jul 5, 2024
deaf355
Improve LSP completion sorting
ChrisPenner Jul 5, 2024
8be432b
change a punctuation
aryairani Jul 5, 2024
2b60344
Merge pull request #5054 from sellout/better-CLI-error-messages
aryairani Jul 5, 2024
c773017
Merge pull request #5180 from unisonweb/arya/commandline-helpers
aryairani Jul 5, 2024
b9f4bfe
Add unused binding detection to LSP
ChrisPenner Jul 5, 2024
293b4a2
Merge pull request #5182 from unisonweb/cp/improve-lsp-completion
aryairani Jul 5, 2024
6a6c4d6
Swap to using para instead of cata
ChrisPenner Jul 5, 2024
25db6fb
Revert back to simple cata
ChrisPenner Jul 5, 2024
e102b0d
fix compile error and use `makeExample` more
aryairani Jul 5, 2024
61287bd
Move warnings to the top of the term
ChrisPenner Jul 5, 2024
a6b8af1
automatically run ormolu
ChrisPenner Jul 5, 2024
222bd48
Merge pull request #5185 from unisonweb/arya/commandline-helpers
aryairani Jul 5, 2024
0331d22
Merge pull request #5186 from unisonweb/lsp/unused-binding-detection
aryairani Jul 5, 2024
0587dde
Compress unused bindings into a single diagnostic
ChrisPenner Jul 5, 2024
dd17539
Fix diagnostic still reporting when no unused bindings
ChrisPenner Jul 5, 2024
49258bc
Merge trunk
ChrisPenner Jul 5, 2024
dd81f0a
disable names.global transcript for now
ChrisPenner Jul 5, 2024
4c89423
Rerun transcripts
ChrisPenner Jul 5, 2024
d0002b4
Disable view.global transcript for now
ChrisPenner Jul 5, 2024
424b43b
Fix up reset transcripts for projects
ChrisPenner Jul 5, 2024
6021a3a
automatically run ormolu
ChrisPenner Jul 6, 2024
927b76b
Get tests building again.
ChrisPenner Jul 6, 2024
c431d35
Fix integration-tests
ChrisPenner Jul 6, 2024
69edcef
Fix up round-trip tests
ChrisPenner Jul 6, 2024
60bb91a
Merge pull request #5188 from unisonweb/lsp/unused-binding-detection
ChrisPenner Jul 6, 2024
ecf5fe1
Merge pull request #5155 from sellout/cp/ghc-upgrade
aryairani Jul 6, 2024
b14931f
avoid numeric vs textual clash in args length error
aryairani Jul 6, 2024
0cea9d6
Merge trunk, clean up random extra files
ChrisPenner Jul 8, 2024
5e775cc
Improve docs
ChrisPenner Jul 8, 2024
c625e47
Add undo.md transcript
ChrisPenner Jul 8, 2024
da449fb
Use annotations from Abs instead
ChrisPenner Jul 8, 2024
9cc6c2b
synhash var bugfix: hash debruijn indexes, not var names
mitchellwrosen Jul 9, 2024
d70b219
automatically run ormolu
mitchellwrosen Jul 9, 2024
701f308
delete unused import
mitchellwrosen Jul 9, 2024
22d4b26
Update unison-cli/src/Unison/CommandLine/InputPatterns.hs
aryairani Jul 9, 2024
ee6793b
Attempt to fix Unused Binding locations
ChrisPenner Jul 8, 2024
94c6bfc
add transcript
mitchellwrosen Jul 9, 2024
223df40
Merge pull request #5192 from unisonweb/topic/numerals
aryairani Jul 9, 2024
615887f
Merge pull request #5194 from unisonweb/synhash-bugfix
aryairani Jul 9, 2024
2c1a048
Don't use DelayForceChar as syntax style for `blah.default()`
pchiusano Jul 9, 2024
c3405c2
Pin Haskell tool versions for VS Code
sellout Jul 9, 2024
66d9b76
Ignore more scratchfiles
ChrisPenner Jul 9, 2024
e506b00
No in-memory branch in loop-state
ChrisPenner Jul 9, 2024
d8e34c2
Write new Transactional Signal type
ChrisPenner Jul 9, 2024
2591ade
Merge pull request #5195 from unisonweb/force-highlighting
pchiusano Jul 9, 2024
4254a51
Update LSP to listen for changes
ChrisPenner Jul 9, 2024
c156ba7
Add isTranscriptTest to Cli.Env
ChrisPenner Jul 9, 2024
6fe6d67
Omit times from project reflogs
ChrisPenner Jul 9, 2024
1e5b925
adjust some output
mitchellwrosen Jul 9, 2024
736ccf1
Merge trunk
ChrisPenner Jul 9, 2024
951f318
preload branches into the branch cache when switching projects
ChrisPenner Jul 9, 2024
d78154d
better rendering of conflicted names in `todo`
mitchellwrosen Jul 9, 2024
09ecc74
Fix test build
ChrisPenner Jul 9, 2024
1543160
Revive move-branch confirmations
ChrisPenner Jul 10, 2024
9b11d96
Merge pull request #5177 from unisonweb/24-07-01-todo-merge-precondit…
aryairani Jul 10, 2024
67a41cd
Docs and transcripts
ChrisPenner Jul 10, 2024
1cd3f3c
Fix move-namespace transcript
ChrisPenner Jul 10, 2024
fa6c59e
Fix merge transcript
ChrisPenner Jul 10, 2024
f725bf2
Fix names transcript
ChrisPenner Jul 10, 2024
9e2fa2b
Replace transcript parser with `cmark`
sellout Jul 10, 2024
1dc181b
Update the transcripts with `cmark`
sellout Jul 10, 2024
0031542
Add a space before code block info strings
sellout Jul 10, 2024
b657d0d
Fix a few transcripts with incorrect Markdown
sellout Jul 10, 2024
8416708
Add transcripts for fixed issues
sellout Jul 10, 2024
179b8d1
Terminate API code blocks correctly
sellout Jul 10, 2024
bf20459
Typo
ChrisPenner Jul 10, 2024
2f4e57d
Fix Upgrade
ChrisPenner Jul 10, 2024
bf44246
Merge remote-tracking branch 'upstream/trunk' into new-transcript-parser
sellout Jul 10, 2024
cbd533e
Update a couple transcripts to the new formatting
sellout Jul 10, 2024
f382ef1
Attempt to fix up update.old
ChrisPenner Jul 10, 2024
a455180
No leading dot on brps
ChrisPenner Jul 10, 2024
a4b67cd
Merge pull request #5204 from sellout/new-transcript-parser
aryairani Jul 11, 2024
0cd3cd1
Merge branch 'trunk' into cp/project-root
aryairani Jul 11, 2024
7113005
Remerge remote
ChrisPenner Jul 11, 2024
4045805
Merge trunk
ChrisPenner Jul 11, 2024
c2958cc
Use pretty text in MsgTrace case of debug toText
dolio Jul 11, 2024
987cd61
Swap branch-relative-paths back to relative
ChrisPenner Jul 11, 2024
474fddb
Use a branch root semispace cache
ChrisPenner Jul 11, 2024
1e4f1ab
Fix diff-helper to use the names from both branches
ChrisPenner Jul 11, 2024
670b086
Port fix2254 to new update
ChrisPenner Jul 11, 2024
60596a2
Merge pull request #5210 from unisonweb/topic/msg-trace
aryairani Jul 11, 2024
be7e6cb
Merge pull request #5041 from unisonweb/cp/project-root
mergify[bot] Jul 11, 2024
a010a8a
Use builtin reference names in foreign decompiling
dolio Jul 12, 2024
212a232
Merge pull request #5216 from unisonweb/topic/decomp-foreign
mergify[bot] Jul 12, 2024
5652c17
Compiling with lamda annotations
ChrisPenner Jul 12, 2024
7c52443
Merge trunk
ChrisPenner Jul 12, 2024
11208f5
Add unused binding test
ChrisPenner Jul 12, 2024
df0261c
Keep most recent path and branches through migration to version 17
ChrisPenner Jul 12, 2024
0dc7b6d
Reset user to project root if they were on a sub-namespace.
ChrisPenner Jul 13, 2024
264a31a
Merge pull request #5218 from unisonweb/lsp/fix-unused-binding-locs
aryairani Jul 13, 2024
ce5c9fe
Merge pull request #5220 from unisonweb/cp/keep-current-branch
aryairani Jul 13, 2024
0c7851d
Don't evaluate the unison file if there are no watch expressions.
ChrisPenner Jul 15, 2024
6ed06f3
Merge remote-tracking branch 'origin/trunk' into merged-ghc-upgrade-t…
neduard Jul 15, 2024
456b8e6
fix warning: add missing Functor
neduard Jul 15, 2024
9516c59
Merge pull request #5223 from unisonweb/cp/skip-eval
aryairani Jul 15, 2024
4e44b94
update transcripts
neduard Jul 15, 2024
ba78b69
Better recursive ref search
ChrisPenner Jul 15, 2024
b65836b
Merge pull request #5226 from unisonweb/cp/faster-dep-collection
aryairani Jul 15, 2024
7019595
Merge pull request #5224 from neduard/merged-ghc-upgrade-try-2
aryairani Jul 15, 2024
960f7d1
Avoid duplicating YAML info in Markdown
sellout Jul 15, 2024
f919c9b
Don’t let Stack tell contributors to upgrade
sellout Jul 15, 2024
605e062
Remove now-unused sync types
ChrisPenner Jul 15, 2024
e108014
Don’t let Stack complain about Nix
sellout Jul 15, 2024
4538189
Merge pull request #5228 from sellout/pin-vscode-versions
aryairani Jul 16, 2024
1337ac2
Merge pull request #5231 from sellout/dont-upgrade-stack
aryairani Jul 16, 2024
525e923
Merge pull request #5227 from sellout/deduplication
aryairani Jul 16, 2024
f17af1f
Document Nix cache configuration
sellout Jul 16, 2024
ce9b1d8
Add docs for updating the Nix config after editing it
sellout Jul 16, 2024
734b6c4
Minor formatting cleanup
sellout Jul 16, 2024
00f6c8c
Refactoring TranscriptParser
sellout Jul 11, 2024
b1cf123
Split `TranscriptParser` into three modules
sellout Jul 16, 2024
bf080a5
Clean up devShell definition
sellout Jul 17, 2024
f189432
Add `cachix` to the devShell
sellout Jul 17, 2024
e3b2e4b
use libb2 for all blake functions
neduard Jul 13, 2024
f18cb2f
use /usr/bin/env sh for jit-tests.sh
neduard Jul 14, 2024
d66c5c7
just whitespace changes
neduard Jul 17, 2024
42ebc76
Merge pull request #5237 from neduard/jit-support-non-gnu-unix-systems
mergify[bot] Jul 18, 2024
b8f1ed9
Run Ormolu over the entire codebase
sellout Jul 18, 2024
f7633ce
Manually reformat chains of single constraints
sellout Jul 19, 2024
9ac6a04
Inform Ormolu of some operator precedences
sellout Jul 19, 2024
01b475c
Merge pull request #5239 from sellout/reformatting
aryairani Jul 19, 2024
2cf03fe
Merge pull request #5230 from unisonweb/cp/unused-sync-types
aryairani Jul 19, 2024
8e469ad
Merge pull request #5233 from sellout/cachix-in-dev-shell
aryairani Jul 19, 2024
ef62cd9
Merge pull request #5235 from sellout/refactor-transcript-parser
aryairani Jul 19, 2024
677266d
Merge pull request #5232 from sellout/doc-nix-cache
aryairani Jul 19, 2024
0582617
Remove reset-root, fix docs for reset
ChrisPenner Jul 22, 2024
6e6c0ab
automatically run ormolu
ChrisPenner Jul 22, 2024
5bedaf3
Update transcripts
ChrisPenner Jul 22, 2024
c4fc8d4
Merge pull request #5243 from unisonweb/cp/remove-reset-root
aryairani Jul 22, 2024
fac6924
Merge remote-tracking branch 'upstream/trunk' into 24-06-21-delete-ol…
sellout Jul 22, 2024
3b34107
Convert Doc v1 transcripts to v2
sellout Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions unison-src/transcripts/doc-formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ This transcript explains a few minor details about doc parsing and pretty-printi
Docs can be used as inline code comments.

```ucm:hide
scratch/main> builtins.merge
scratch/main> builtins.mergeio
```

```unison
foo : Nat -> Nat
foo n =
_ = [: do the thing :]
_ = {{ do the thing }}
n + 1
```

Expand All @@ -20,10 +20,10 @@ scratch/main> add
scratch/main> view foo
```

Note that `@` and `:]` must be escaped within docs.
Note that `{{`, `@`, and `}}` must be escaped within docs.

```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?

```

```ucm:hide
Expand All @@ -33,16 +33,16 @@ scratch/main> add
scratch/main> view escaping
```

(Alas you can't have `\@` or `\:]` in your doc, as there's currently no way to 'unescape' them.)
(Alas you can't have `\@` or `\}}` in your doc, as there's currently no way to 'unescape' them.)

```unison
-- Note that -- comments are preserved within doc literals.
commented = [:
commented = {{
example:

-- a comment
f x = x + 1
:]
}}
```

```ucm:hide
Expand All @@ -60,7 +60,7 @@ Handling of indenting in docs between the parser and pretty-printer is a bit fid
-- The leading and trailing spaces are stripped from the stored Doc by the
-- lexer, and one leading and trailing space is inserted again on view/edit
-- by the pretty-printer.
doc1 = [: hi :]
doc1 = {{ hi }}
```

```ucm:hide
Expand All @@ -71,15 +71,15 @@ scratch/main> view doc1
```

```unison
-- Lines (apart from the first line, i.e. the bit between the [: and the
-- Lines (apart from the first line, i.e. the bit between the {{ and the
-- first newline) are unindented until at least one of
-- them hits the left margin (by a post-processing step in the parser).
-- You may not notice this because the pretty-printer indents them again on
-- view/edit.
doc2 = [: hello
doc2 = {{ hello
- foo
- bar
and the rest. :]
and the rest. }}
```

```ucm:hide
Expand All @@ -90,7 +90,7 @@ scratch/main> view doc2
```

```unison
doc3 = [: When Unison identifies a paragraph, it removes any newlines from it before storing it, and then reflows the paragraph text to fit the display window on display/view/edit.
doc3 = {{ When Unison identifies a paragraph, it removes any newlines from it before storing it, and then reflows the paragraph text to fit the display window on display/view/edit.

For these purposes, a paragraph is any sequence of non-empty lines that have zero indent (after the unindenting mentioned above.)

Expand All @@ -101,7 +101,7 @@ For these purposes, a paragraph is any sequence of non-empty lines that have zer
is not treated | either.

Note that because of the special treatment of the first line mentioned above, where its leading space is removed, it is always treated as a paragraph.
:]
}}
```

```ucm:hide
Expand All @@ -112,11 +112,11 @@ scratch/main> view doc3
```

```unison
doc4 = [: Here's another example of some paragraphs.
doc4 = {{ Here's another example of some paragraphs.

All these lines have zero indent.

- Apart from this one. :]
- Apart from this one. }}
```

```ucm:hide
Expand All @@ -130,10 +130,10 @@ scratch/main> view doc4
-- The special treatment of the first line does mean that the following
-- is pretty-printed not so prettily. To fix that we'd need to get the
-- lexer to help out with interpreting doc literal indentation (because
-- it knows what columns the `[:` was in.)
doc5 = [: - foo
-- it knows what columns the `{{` was in.)
doc5 = {{ - foo
- bar
and the rest. :]
and the rest. }}
```

```ucm:hide
Expand All @@ -145,11 +145,11 @@ scratch/main> view doc5

```unison
-- You can do the following to avoid that problem.
doc6 = [:
doc6 = {{
- foo
- bar
and the rest.
:]
}}
```

```ucm:hide
Expand All @@ -163,7 +163,7 @@ scratch/main> view doc6

```unison
-- Check empty doc works.
empty = [::]
empty = {{}}

expr = foo 1
```
Expand All @@ -175,7 +175,7 @@ scratch/main> view empty
```

```unison
test1 = [:
test1 = {{
The internal logic starts to get hairy when you use the \@ features, for example referencing a name like @List.take. Internally, the text between each such usage is its own blob (blob ends here --> @List.take), so paragraph reflow has to be aware of multiple blobs to do paragraph reflow (or, more accurately, to do the normalization step where newlines with a paragraph are removed.)

Para to reflow: lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor ending in ref @List.take
Expand Down Expand Up @@ -211,7 +211,7 @@ para line lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolo
-- note the leading space below
@[signature] List.take

:]
}}
```
```ucm:hide
scratch/main> add
Expand All @@ -222,8 +222,8 @@ scratch/main> view test1

```unison
-- Regression test for #1363 - preservation of spaces after @ directives in first line when unindenting
reg1363 = [: `@List.take foo` bar
baz :]
reg1363 = {{ `@List.take foo` bar
baz }}
```
```ucm:hide
scratch/main> add
Expand All @@ -236,10 +236,10 @@ scratch/main> view reg1363
-- Demonstrate doc display when whitespace follows a @[source] or @[evaluate]
-- whose output spans multiple lines.

test2 = [:
test2 = {{
Take a look at this:
@[source] foo ▶ bar
:]
}}
```
```ucm:hide
scratch/main> add
Expand Down
Loading