mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-26 02:55:19 +03:00
Add "missing constructor" precondition violation example
This commit is contained in:
parent
7455187b43
commit
9501bf7bec
@ -450,3 +450,28 @@ proj/main> merge2 /topic
|
||||
```ucm:hide
|
||||
.> project.delete proj
|
||||
```
|
||||
|
||||
### Missing constructor
|
||||
|
||||
```ucm:hide
|
||||
.> project.create-empty proj
|
||||
proj/main> builtins.mergeio
|
||||
```
|
||||
|
||||
```unison
|
||||
unique type Foo = Bar | Baz
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> add
|
||||
proj/main> branch topic
|
||||
proj/topic> delete.term Foo.Bar
|
||||
```
|
||||
|
||||
```ucm:error
|
||||
proj/main> merge2 /topic
|
||||
```
|
||||
|
||||
```ucm:hide
|
||||
.> project.delete proj
|
||||
```
|
||||
|
@ -887,7 +887,6 @@ proj/main> merge2 /topic
|
||||
```
|
||||
### Constructor alias
|
||||
|
||||
|
||||
```unison
|
||||
unique type Foo = Bar
|
||||
```
|
||||
@ -931,3 +930,47 @@ proj/main> merge2 /topic
|
||||
declaration must have exactly one name for each constructor.
|
||||
|
||||
```
|
||||
### Missing constructor
|
||||
|
||||
```unison
|
||||
unique type Foo = Bar | Baz
|
||||
```
|
||||
|
||||
```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`:
|
||||
|
||||
type Foo
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
type Foo
|
||||
|
||||
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.
|
||||
|
||||
proj/topic> delete.term Foo.Bar
|
||||
|
||||
Done.
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> merge2 /topic
|
||||
|
||||
Missing constructor name.
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user