mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-26 02:55:19 +03:00
Show that you can’t ls
the results of ls
This commit is contained in:
parent
ce33057385
commit
24ff8b5cb0
16
unison-src/transcripts/fix-ls.md
Normal file
16
unison-src/transcripts/fix-ls.md
Normal file
@ -0,0 +1,16 @@
|
||||
```ucm
|
||||
.> project.create-empty test-ls
|
||||
test-ls/main> builtins.merge
|
||||
```
|
||||
|
||||
```unison
|
||||
foo.bar.add x y = x Int.+ y
|
||||
|
||||
foo.bar.subtract x y = x Int.- y
|
||||
```
|
||||
|
||||
```ucm
|
||||
test-ls/main> add
|
||||
test-ls/main> ls foo
|
||||
test-ls/main> ls 1
|
||||
```
|
65
unison-src/transcripts/fix-ls.output.md
Normal file
65
unison-src/transcripts/fix-ls.output.md
Normal file
@ -0,0 +1,65 @@
|
||||
```ucm
|
||||
.> project.create-empty test-ls
|
||||
|
||||
🎉 I've created the project test-ls.
|
||||
|
||||
🎨 Type `ui` to explore this project's code in your browser.
|
||||
🔭 Discover libraries at https://share.unison-lang.org
|
||||
📖 Use `help-topic projects` to learn more about projects.
|
||||
|
||||
Write your first Unison code with UCM:
|
||||
|
||||
1. Open scratch.u.
|
||||
2. Write some Unison code and save the file.
|
||||
3. In UCM, type `add` to save it to your new project.
|
||||
|
||||
🎉 🥳 Happy coding!
|
||||
|
||||
test-ls/main> builtins.merge
|
||||
|
||||
Done.
|
||||
|
||||
```
|
||||
```unison
|
||||
foo.bar.add x y = x Int.+ y
|
||||
|
||||
foo.bar.subtract x y = x Int.- y
|
||||
```
|
||||
|
||||
```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`:
|
||||
|
||||
foo.bar.add : Int -> Int -> Int
|
||||
foo.bar.subtract : Int -> Int -> Int
|
||||
|
||||
```
|
||||
```ucm
|
||||
test-ls/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
foo.bar.add : Int -> Int -> Int
|
||||
foo.bar.subtract : Int -> Int -> Int
|
||||
|
||||
test-ls/main> ls foo
|
||||
|
||||
1. bar/ (2 terms)
|
||||
|
||||
test-ls/main> ls 1
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
🛑
|
||||
|
||||
The transcript failed due to an error in the stanza above. The error is:
|
||||
|
||||
Expected a namespace, but the numbered arg resulted in foo.bar, which is a name.
|
Loading…
Reference in New Issue
Block a user