mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-17 13:27:30 +03:00
Add transcript demonstrating #4556
This commit is contained in:
parent
493dd6874f
commit
3c7101c105
22
unison-src/transcripts/fix4556.md
Normal file
22
unison-src/transcripts/fix4556.md
Normal file
@ -0,0 +1,22 @@
|
||||
```ucm:hide
|
||||
.> builtins.merge
|
||||
```
|
||||
|
||||
```unison
|
||||
thing = 3
|
||||
foo.hello = 5 + thing
|
||||
bar.hello = 5 + thing
|
||||
hey = foo.hello
|
||||
```
|
||||
|
||||
```ucm
|
||||
.> add
|
||||
```
|
||||
|
||||
```unison
|
||||
thing = 2
|
||||
```
|
||||
|
||||
```ucm:error
|
||||
.> update
|
||||
```
|
80
unison-src/transcripts/fix4556.output.md
Normal file
80
unison-src/transcripts/fix4556.output.md
Normal file
@ -0,0 +1,80 @@
|
||||
```unison
|
||||
thing = 3
|
||||
foo.hello = 5 + thing
|
||||
bar.hello = 5 + thing
|
||||
hey = foo.hello
|
||||
```
|
||||
|
||||
```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`:
|
||||
|
||||
bar.hello : Nat
|
||||
foo.hello : Nat
|
||||
hey : Nat
|
||||
thing : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
.> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
bar.hello : Nat
|
||||
foo.hello : Nat
|
||||
hey : Nat
|
||||
thing : Nat
|
||||
|
||||
```
|
||||
```unison
|
||||
thing = 2
|
||||
```
|
||||
|
||||
```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 names already exist. You can `update` them to your
|
||||
new definition:
|
||||
|
||||
thing : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
.> update
|
||||
|
||||
Okay, I'm searching the branch for code that needs to be
|
||||
updated...
|
||||
|
||||
That's done. Now I'm making sure everything typechecks...
|
||||
|
||||
hey : Nat
|
||||
hey = hello
|
||||
|
||||
foo.hello : Nat
|
||||
foo.hello =
|
||||
use Nat +
|
||||
5 + thing
|
||||
|
||||
bar.hello : Nat
|
||||
bar.hello =
|
||||
use Nat +
|
||||
5 + thing
|
||||
|
||||
thing = 2
|
||||
|
||||
Typechecking failed. I've updated your scratch file with the
|
||||
definitions that need fixing. Once the file is compiling, try
|
||||
`update` again.
|
||||
|
||||
```
|
Loading…
Reference in New Issue
Block a user