mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
update transcripts
This commit is contained in:
parent
456b8e635a
commit
4e44b94ad6
@ -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.
|
||||
|
||||
|
@ -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\!
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user