-
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.
Merge pull request #4434 from unisonweb/fix/update-new-record
- Loading branch information
Showing
5 changed files
with
51 additions
and
4 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
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
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
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,12 @@ | ||
```ucm:hide | ||
.lib> builtins.merge | ||
``` | ||
|
||
```unison | ||
unique type Foo = { bar : Nat } | ||
``` | ||
|
||
```ucm | ||
.> update | ||
.> view Foo | ||
``` |
35 changes: 35 additions & 0 deletions
35
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,35 @@ | ||
```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 | ||
``` | ||
```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... | ||
Done. | ||
.> view Foo | ||
unique type Foo = { bar : Nat } | ||
``` |