update transcripts

This commit is contained in:
Eduard Nicodei 2024-07-15 19:10:27 +01:00
parent 456b8e635a
commit 4e44b94ad6
11 changed files with 69 additions and 45 deletions

View File

@ -30,26 +30,28 @@ This mapping of names to port numbers is maintained by the [nsswitch
service](https://en.wikipedia.org/wiki/Name_Service_Switch), typically
stored in `/etc/services` and queried with the `getent` tool:
# map number to name
$ getent services 22
ssh 22/tcp
# map name to number
$ getent services finger
finger 79/tcp
# get a list of all known names
$ getent services | head
tcpmux 1/tcp
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users
daytime 13/tcp
daytime 13/udp
netstat 15/tcp
qotd 17/tcp quote
```
# map number to name
$ getent services 22
ssh 22/tcp
# map name to number
$ getent services finger
finger 79/tcp
# get a list of all known names
$ getent services | head
tcpmux 1/tcp
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users
daytime 13/tcp
daytime 13/udp
netstat 15/tcp
qotd 17/tcp quote
```
Below shows different examples of how we might specify the server coordinates.

View File

@ -1,12 +1,14 @@
The `alias.many` command can be used to copy definitions from the current namespace into your curated one.
The names that will be used in the target namespace are the names you specify, relative to the current namespace:
scratch/main> help alias.many
alias.many (or copy)
`alias.many <relative1> [relative2...] <namespace>` creates aliases `relative1`, `relative2`, ...
in the namespace `namespace`.
`alias.many foo.foo bar.bar .quux` creates aliases `.quux.foo.foo` and `.quux.bar.bar`.
```
scratch/main> help alias.many
alias.many (or copy)
`alias.many <relative1> [relative2...] <namespace>` creates aliases `relative1`, `relative2`, ...
in the namespace `namespace`.
`alias.many foo.foo bar.bar .quux` creates aliases `.quux.foo.foo` and `.quux.bar.bar`.
```
Let's try it\!

View File

@ -2,7 +2,9 @@ This tests a variable related bug in the ANF compiler.
The nested let would get flattened out, resulting in:
bar = result
```
bar = result
```
which would be handled by renaming. However, the *context* portion of
the rest of the code was not being renamed correctly, so `bar` would

View File

@ -2,7 +2,9 @@ This tests an issue where ability variables were being defaulted over
eagerly. In general, we want to avoid collecting up variables from the
use of definitions with types like:
T ->{e} U
```
T ->{e} U
```
Since this type works for every `e`, it is, 'pure;' and we might as
well have `e = {}`, since `{}` is a subrow of every other row.
@ -11,7 +13,9 @@ ongoing inference, it's undesirable to default it. Previously there
was a check to see if `e` occurred in the context. However, the wanted
abilities being collected aren't in the context, so types like:
T ->{S e} U ->{e} V
```
T ->{S e} U ->{e} V
```
were a corner case. We would add `S e` to the wanted abilities, then
not realize that `e` shouldn't be defaulted.

View File

@ -2,7 +2,9 @@ Tests an issue with a lack of generality of handlers.
In general, a set of cases:
{ e ... -> k }
```
{ e ... -> k }
```
should be typed in the following way:

View File

@ -2,7 +2,9 @@ Tests a variable capture problem.
After pattern compilation, the match would end up:
T p1 p3 p3
```
T p1 p3 p3
```
and z would end up referring to the first p3 rather than the second.

View File

@ -33,8 +33,10 @@ scratch/main> display README
```
Previously, the error was:
⚙️ Processing stanza 5 of 7.ucm: PE [("die",SrcLoc {srcLocPackage = "unison-parser-typechecker-0.0.0-He2Hp1llokT2nN4MnUfUXz", srcLocModule = "Unison.Runtime.Interface", srcLocFile = "src/Unison/Runtime/Interface.hs", srcLocStartLine = 118, srcLocStartCol = 18, srcLocEndLine = 118, srcLocEndCol = 60})] Lit
AnnotatedText (fromList [Segment {segment = "Unknown term reference: #4522d", annotation = Nothing}])
```
⚙️ Processing stanza 5 of 7.ucm: PE [("die",SrcLoc {srcLocPackage = "unison-parser-typechecker-0.0.0-He2Hp1llokT2nN4MnUfUXz", srcLocModule = "Unison.Runtime.Interface", srcLocFile = "src/Unison/Runtime/Interface.hs", srcLocStartLine = 118, srcLocStartCol = 18, srcLocEndLine = 118, srcLocEndCol = 60})] Lit
AnnotatedText (fromList [Segment {segment = "Unknown term reference: #4522d", annotation = Nothing}])
```
but as of this PR, it's okay.

View File

@ -4,7 +4,9 @@ This markdown file is also a Unison transcript file. Transcript files are an eas
The format is just a regular markdown file with some fenced code blocks that are typechecked and elaborated by `ucm`. For example, you can call this transcript via:
$ ucm transcript hello.md
```
$ ucm transcript hello.md
```
This runs it on a freshly generated empty codebase. Alternately `ucm transcript.fork --codebase /path/to/code hello.md` runs the transcript on a freshly generated copy of the provided codebase. Do `ucm help` to learn more about usage.

View File

@ -76,7 +76,9 @@ You can run `help update` for more information on using
```
aliasTerm
scratch/main> alias.term ##Nat.+ Nat.+
```
scratch/main> alias.term ##Nat.+ Nat.+
```
aliasTermForce,
aliasType,

View File

@ -85,10 +85,12 @@ scratch/main> names .some.place.x
TODO: swap this back to a 'ucm' block when names.global is re-implemented
-- We can search from a different branch and find all names in the codebase named 'x', and each of their aliases respectively.
scratch/other> names.global x
-- We can search by hash, and see all aliases of that hash in the codebase
scratch/other> names.global #gjmq673r1v
-- We can search using an absolute name
scratch/other> names.global .some.place.x
```
-- We can search from a different branch and find all names in the codebase named 'x', and each of their aliases respectively.
scratch/other> names.global x
-- We can search by hash, and see all aliases of that hash in the codebase
scratch/other> names.global #gjmq673r1v
-- We can search using an absolute name
scratch/other> names.global .some.place.x
```

View File

@ -24,8 +24,10 @@ scratch/main> view .b.thing
```
TODO: swap this back to a 'ucm' block when view.global is re-implemented
-- view.global should search globally and be absolutely qualified
scratch/other> view.global thing
-- Should support branch relative paths
scratch/other> view /main:a.thing
```
-- view.global should search globally and be absolutely qualified
scratch/other> view.global thing
-- Should support branch relative paths
scratch/other> view /main:a.thing
```