mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
add terms in lib precondition violation example
This commit is contained in:
parent
15e33f439a
commit
a08f509aa5
@ -388,3 +388,40 @@ proj/main> merge2 /topic
|
||||
```ucm:hide
|
||||
.> project.delete proj
|
||||
```
|
||||
|
||||
## Precondition violations
|
||||
|
||||
### term in lib
|
||||
|
||||
|
||||
```ucm:hide
|
||||
.> project.create-empty proj
|
||||
proj/main> builtins.mergeio
|
||||
```
|
||||
|
||||
```unison
|
||||
lib.foo : Nat
|
||||
lib.foo = 1
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> add
|
||||
proj/main> branch topic
|
||||
```
|
||||
|
||||
```unison
|
||||
bonk : Nat
|
||||
bonk = 5
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/topic> add
|
||||
```
|
||||
|
||||
```ucm:error
|
||||
proj/main> merge2 /topic
|
||||
```
|
||||
|
||||
```ucm:hide
|
||||
.> project.delete proj
|
||||
```
|
||||
|
@ -815,3 +815,73 @@ bar =
|
||||
foo + 1
|
||||
```
|
||||
|
||||
## Precondition violations
|
||||
|
||||
### term in lib
|
||||
|
||||
|
||||
```unison
|
||||
lib.foo : Nat
|
||||
lib.foo = 1
|
||||
```
|
||||
|
||||
```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`:
|
||||
|
||||
lib.foo : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
lib.foo : Nat
|
||||
|
||||
proj/main> branch topic
|
||||
|
||||
Done. I've created the topic branch based off of main.
|
||||
|
||||
Tip: Use `merge /topic /main` to merge your work back into the
|
||||
main branch.
|
||||
|
||||
```
|
||||
```unison
|
||||
bonk : Nat
|
||||
bonk = 5
|
||||
```
|
||||
|
||||
```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`:
|
||||
|
||||
bonk : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/topic> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
bonk : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> merge2 /topic
|
||||
|
||||
Defns in lib
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user