2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> builtins.merge
|
2023-11-08 01:55:38 +03:00
|
|
|
|
|
|
|
Done.
|
|
|
|
|
|
|
|
```
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2023-11-08 01:55:38 +03:00
|
|
|
foo : Nat
|
|
|
|
foo = 5
|
|
|
|
|
|
|
|
bar : Nat
|
|
|
|
bar = foo + 10
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2023-11-08 01:55:38 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2023-11-08 01:55:38 +03:00
|
|
|
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
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
2023-11-08 01:55:38 +03:00
|
|
|
|
|
|
|
⍟ I've added these definitions:
|
|
|
|
|
|
|
|
bar : Nat
|
|
|
|
foo : Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2023-11-08 01:55:38 +03:00
|
|
|
foo : Int
|
|
|
|
foo = +5
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2023-11-08 01:55:38 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2023-11-08 01:55:38 +03:00
|
|
|
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-06-12 01:22:09 +03:00
|
|
|
scratch/main> update
|
2023-11-08 01:55:38 +03:00
|
|
|
|
2023-11-14 06:36:03 +03:00
|
|
|
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.
|
2023-11-08 01:55:38 +03:00
|
|
|
|
|
|
|
```
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison:added-by-ucm scratch.u
|
2024-07-23 20:45:16 +03:00
|
|
|
foo : Int
|
|
|
|
foo = +5
|
|
|
|
|
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-05 02:04:28 +03:00
|
|
|
bar : Nat
|
|
|
|
bar =
|
|
|
|
use Nat +
|
|
|
|
foo + 10
|
|
|
|
|
|
|
|
```
|
|
|
|
|