mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
Rerun transcripts
This commit is contained in:
parent
dd81f0aa95
commit
4c89423ef1
@ -40,7 +40,8 @@ scratch/main> alias.many List.adjacentPairs List.all List.any List.chunk List.ch
|
||||
14. List.tail : [a] -> Optional [a]
|
||||
15. List.takeWhile : (a ->{𝕖} Boolean) -> [a] ->{𝕖} [a]
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> find-in mylib
|
||||
|
||||
|
@ -45,7 +45,8 @@ scratch/main> delete.term.verbose a.b.one
|
||||
|
||||
1. a.b.one : ##Nat
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> alias.term a.two a.newtwo
|
||||
|
||||
|
@ -36,7 +36,8 @@ scratch/main> delete.verbose foo
|
||||
|
||||
1. foo : Nat
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> delete.verbose Foo
|
||||
|
||||
@ -44,7 +45,8 @@ scratch/main> delete.verbose Foo
|
||||
|
||||
1. structural type Foo
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> delete.verbose Foo.Foo
|
||||
|
||||
@ -52,7 +54,8 @@ scratch/main> delete.verbose Foo.Foo
|
||||
|
||||
1. Foo.Foo : '#089vmor9c5
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
```
|
||||
How about an ambiguous term?
|
||||
@ -90,7 +93,8 @@ scratch/main> delete.verbose a.foo
|
||||
2. a.bar ┐ 3. a.foo#dcgdua2lj6 (removed)
|
||||
4. a.foo#dcgdua2lj6 ┘
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> ls a
|
||||
|
||||
@ -130,7 +134,8 @@ scratch/main> delete.verbose a.Foo
|
||||
4. lib.builtins.Unit │
|
||||
5. a.Foo#00nv2kob8f ┘
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> delete.verbose a.Foo.Foo
|
||||
|
||||
@ -138,7 +143,8 @@ scratch/main> delete.verbose a.Foo.Foo
|
||||
|
||||
1. a.Foo.Foo : '#089vmor9c5
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
```
|
||||
Finally, let's try to delete a term and a type with the same name.
|
||||
@ -163,7 +169,8 @@ scratch/main> delete.verbose foo
|
||||
1. structural type foo
|
||||
2. foo : Nat
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
```
|
||||
We want to be able to delete multiple terms at once
|
||||
@ -191,7 +198,8 @@ scratch/main> delete.verbose a b c
|
||||
2. b : Text
|
||||
3. c : Text
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
```
|
||||
We can delete terms and types in the same invocation of delete
|
||||
@ -222,7 +230,8 @@ scratch/main> delete.verbose a b c Foo
|
||||
3. b : Text
|
||||
4. c : Text
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> delete.verbose Foo.Foo
|
||||
|
||||
@ -232,7 +241,8 @@ scratch/main> delete.verbose Foo.Foo
|
||||
1. Foo.Foo ┐ 2. Foo.Foo (removed)
|
||||
3. foo.Foo ┘
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
```
|
||||
We can delete a type and its constructors
|
||||
@ -260,7 +270,8 @@ scratch/main> delete.verbose Foo Foo.Foo
|
||||
2. Foo.Foo ┐ 3. Foo.Foo (removed)
|
||||
4. foo.Foo ┘
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
```
|
||||
You should not be able to delete terms which are referenced by other terms
|
||||
@ -324,7 +335,8 @@ scratch/main> delete.verbose e f g h
|
||||
3. g : Nat
|
||||
4. h : Nat
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
```
|
||||
You should be able to delete a type and all the functions that reference it in a single command
|
||||
@ -353,7 +365,8 @@ scratch/main> delete.verbose Foo Foo.Foo incrementFoo
|
||||
2. Foo.Foo : Nat -> #68k40ra7l7
|
||||
3. incrementFoo : #68k40ra7l7 -> Nat
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
```
|
||||
If you mess up on one of the names of your command, delete short circuits
|
||||
@ -404,7 +417,8 @@ scratch/main> delete.verbose ping
|
||||
|
||||
1. ping : 'Nat
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> view pong
|
||||
|
||||
|
@ -64,7 +64,7 @@ scratch/main> diff.namespace .nothing /ns1:
|
||||
```
|
||||
|
||||
```ucm:error
|
||||
scratch/main> diff.namespace /ns1: ns2:
|
||||
scratch/main> diff.namespace /ns1: /ns2:
|
||||
```
|
||||
|
||||
```unison:hide
|
||||
|
@ -112,15 +112,9 @@ scratch/main> diff.namespace .nothing /ns1:
|
||||
|
||||
```
|
||||
```ucm
|
||||
scratch/main> diff.namespace /ns1: ns2:
|
||||
|
||||
<none>:1:4:
|
||||
|
|
||||
1 | ns2:
|
||||
| ^
|
||||
unexpected ':'
|
||||
expecting '/' or end of input
|
||||
scratch/main> diff.namespace /ns1: /ns2:
|
||||
|
||||
The namespaces are identical.
|
||||
|
||||
```
|
||||
```unison
|
||||
@ -274,7 +268,8 @@ scratch/ns2> delete.term.verbose fromJust'
|
||||
3. fromJust' │
|
||||
4. yoohoo ┘
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
scratch/main> diff.namespace /ns3: /ns2:
|
||||
|
||||
|
@ -40,12 +40,14 @@ scratch/main> help
|
||||
branch `foo`
|
||||
`branch /bar foo` forks the branch `bar` of the current
|
||||
project to a new branch `foo`
|
||||
`branch .bar foo` forks the path `.bar` of the current
|
||||
project to a new branch `foo`
|
||||
|
||||
branch.empty (or branch.create-empty, create.empty-branch)
|
||||
Create a new empty branch.
|
||||
|
||||
branch.reflog (or reflog.branch, reflog)
|
||||
`branch.reflog` lists all the changes that have affected the current branch.
|
||||
`branch.reflog /mybranch` lists all the changes that have affected /mybranch.
|
||||
|
||||
branch.rename (or rename.branch)
|
||||
`branch.rename foo` renames the current branch to `foo`
|
||||
|
||||
@ -178,6 +180,9 @@ scratch/main> help
|
||||
that `fzf` can be found within your
|
||||
PATH.
|
||||
|
||||
deprecated.root-reflog
|
||||
`deprecated.root-reflog` lists the changes that have affected the root namespace. This has been deprecated in favor of `branch.reflog` which shows the reflog for the current project.
|
||||
|
||||
diff.namespace
|
||||
`diff.namespace before after` shows how the namespace `after`
|
||||
differs from the namespace
|
||||
@ -538,6 +543,10 @@ scratch/main> help
|
||||
`project.create` creates a project with a random name
|
||||
`project.create foo` creates a project named `foo`
|
||||
|
||||
project.reflog (or reflog.project)
|
||||
`project.reflog` lists all the changes that have affected any branches in the current project.
|
||||
`project.reflog myproject` lists all the changes that have affected any branches in myproject.
|
||||
|
||||
project.rename (or rename.project)
|
||||
`project.rename foo` renames the current project to `foo`
|
||||
|
||||
@ -666,8 +675,8 @@ scratch/main> help
|
||||
quit (or exit, :q)
|
||||
Exits the Unison command line interface.
|
||||
|
||||
reflog
|
||||
`reflog` lists the changes that have affected the root namespace
|
||||
reflog.global
|
||||
`reflog.global` lists all recent changes across all projects and branches.
|
||||
|
||||
release.draft (or draft.release)
|
||||
Draft a release.
|
||||
|
@ -59,7 +59,8 @@ scratch/main> move.namespace .root.at.path .
|
||||
|
||||
A branch existed at the destination: . so I over-wrote it.
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
Done.
|
||||
|
||||
@ -350,7 +351,8 @@ scratch/existing> move.namespace a b
|
||||
|
||||
A branch existed at the destination: b so I over-wrote it.
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
Tip: You can use `undo` or use a hash from `branch.reflog` to
|
||||
undo this change.
|
||||
|
||||
Done.
|
||||
|
||||
|
@ -33,6 +33,46 @@ bar = foo + foo
|
||||
change:
|
||||
|
||||
⍟ These new definitions are ok to `add`:
|
||||
|
||||
bar : Nat
|
||||
foo : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
project/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
bar : Nat
|
||||
foo : Nat
|
||||
|
||||
project/main> todo
|
||||
|
||||
These terms call `todo`:
|
||||
|
||||
1. foo
|
||||
|
||||
```
|
||||
# Direct dependencies without names
|
||||
|
||||
The `todo` command shows hashes of direct dependencies of local (outside `lib`) definitions that don't have names in
|
||||
the current namespace.
|
||||
|
||||
```unison
|
||||
foo.bar = 15
|
||||
baz = foo.bar + foo.bar
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
I found and typechecked these definitions in scratch.u. If you
|
||||
do an `add` or `update`, here's how your codebase would
|
||||
change:
|
||||
|
||||
⍟ These new definitions are ok to `add`:
|
||||
|
||||
baz : Nat
|
||||
foo.bar : Nat
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user