2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2024-01-10 22:06:46 +03:00
|
|
|
a.x.x.x.x = 100
|
|
|
|
b.x.x.x.x = 100
|
|
|
|
foo = 25
|
|
|
|
c.y.y.y.y = foo + 10
|
|
|
|
d.y.y.y.y = foo + 10
|
|
|
|
bar = a.x.x.x.x + c.y.y.y.y
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-01-10 22:06:46 +03:00
|
|
|
|
|
|
|
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`:
|
|
|
|
|
|
|
|
a.x.x.x.x : Nat
|
|
|
|
b.x.x.x.x : Nat
|
|
|
|
bar : Nat
|
|
|
|
c.y.y.y.y : Nat
|
|
|
|
d.y.y.y.y : Nat
|
|
|
|
foo : Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-01-10 22:06:46 +03:00
|
|
|
myproject/main> add
|
|
|
|
|
|
|
|
⍟ I've added these definitions:
|
|
|
|
|
|
|
|
a.x.x.x.x : Nat
|
|
|
|
b.x.x.x.x : Nat
|
|
|
|
bar : Nat
|
|
|
|
c.y.y.y.y : Nat
|
|
|
|
d.y.y.y.y : Nat
|
|
|
|
foo : Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2024-01-10 22:06:46 +03:00
|
|
|
foo = +30
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-01-10 22:06:46 +03:00
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
foo : Int
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-01-10 22:06:46 +03:00
|
|
|
myproject/main> update
|
|
|
|
|
|
|
|
Okay, I'm searching the branch for code that needs to be
|
|
|
|
updated...
|
|
|
|
|
|
|
|
That's done. Now I'm making sure everything typechecks...
|
|
|
|
|
|
|
|
Typechecking failed. I've updated your scratch file with the
|
|
|
|
definitions that need fixing. Once the file is compiling, try
|
|
|
|
`update` again.
|
|
|
|
|
|
|
|
```
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison:added-by-ucm scratch.u
|
2024-07-23 20:45:16 +03:00
|
|
|
foo = +30
|
|
|
|
|
2024-08-02 00:49:45 +03:00
|
|
|
-- The definitions below no longer typecheck with the changes above.
|
|
|
|
-- Please fix the errors and try `update` again.
|
2024-07-23 20:45:16 +03:00
|
|
|
|
2024-01-10 22:06:46 +03:00
|
|
|
bar : Nat
|
|
|
|
bar =
|
|
|
|
use Nat +
|
2024-01-10 22:08:22 +03:00
|
|
|
x + c.y.y.y.y
|
2024-01-10 22:06:46 +03:00
|
|
|
|
2024-03-11 20:42:31 +03:00
|
|
|
c.y.y.y.y : Nat
|
|
|
|
c.y.y.y.y =
|
2024-01-10 22:06:46 +03:00
|
|
|
use Nat +
|
|
|
|
foo + 10
|
|
|
|
|
2024-03-11 20:42:31 +03:00
|
|
|
d.y.y.y.y : Nat
|
|
|
|
d.y.y.y.y =
|
2024-01-10 22:06:46 +03:00
|
|
|
use Nat +
|
|
|
|
foo + 10
|
|
|
|
|
|
|
|
```
|
|
|
|
|