-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arya Irani
committed
Nov 22, 2023
1 parent
79eeee7
commit 5bc3324
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
```ucm:hide | ||
.lib> builtins.merge | ||
``` | ||
|
||
```unison | ||
unique type Foo = { bar : Nat } | ||
``` | ||
|
||
This shouldn't be an error. | ||
|
||
```ucm:error | ||
.> update | ||
.> view Foo | ||
``` |
45 changes: 45 additions & 0 deletions
45
unison-src/transcripts/update-type-add-new-record.output.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
```unison | ||
unique type Foo = { bar : Nat } | ||
``` | ||
|
||
```ucm | ||
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`: | ||
unique type Foo | ||
Foo.bar : Foo -> Nat | ||
Foo.bar.modify : (Nat ->{g} Nat) -> Foo ->{g} Foo | ||
Foo.bar.set : Nat -> Foo -> Foo | ||
``` | ||
This shouldn't be an error. | ||
|
||
```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... | ||
Everything typechecks, so I'm saving the results... | ||
I couldn't complete the update because I couldn't find 0 | ||
constructor(s) for Foo where I expected to. I found: [] | ||
You can use `view Foo` and | ||
`alias.term <hash> Foo.<ConstructorName>` to give names to | ||
each constructor, and then try again. | ||
.> view Foo | ||
⚠️ | ||
The following names were not found in the codebase. Check your spelling. | ||
Foo | ||
``` |