mirror of
https://github.com/unisonweb/unison.git
synced 2024-08-15 13:30:27 +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.
|
||||
|
||||
|
@ -31,8 +31,48 @@ bar = foo + foo
|
||||
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`:
|
||||
|
||||
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
|
||||
|
||||
@ -41,7 +81,7 @@ bar = foo + foo
|
||||
project/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
|
||||
baz : Nat
|
||||
foo.bar : Nat
|
||||
|
||||
@ -50,17 +90,17 @@ project/main> delete.namespace.force foo
|
||||
Done.
|
||||
|
||||
⚠️
|
||||
|
||||
|
||||
Of the things I deleted, the following are still used in the
|
||||
following definitions. They now contain un-named references.
|
||||
|
||||
|
||||
Dependency Referenced In
|
||||
bar 1. baz
|
||||
|
||||
project/main> todo
|
||||
|
||||
These terms do not have any names in the current namespace:
|
||||
|
||||
|
||||
1. #1jujb8oelv
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user