-
Notifications
You must be signed in to change notification settings - Fork 270
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 #5139 from unisonweb/24-06-26-delete-type-force
feat: add debug.alias.type.force
- Loading branch information
Showing
5 changed files
with
98 additions
and
10 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,28 @@ | ||
`alias.type` makes a new name for a type. | ||
|
||
```ucm:hide | ||
project/main> builtins.mergeio lib.builtins | ||
``` | ||
|
||
```ucm | ||
project/main> alias.type lib.builtins.Nat Foo | ||
project/main> ls | ||
``` | ||
|
||
It won't create a conflicted name, though. | ||
|
||
```ucm:error | ||
project/main> alias.type lib.builtins.Int Foo | ||
``` | ||
|
||
```ucm | ||
project/main> ls | ||
``` | ||
|
||
You can use `debug.alias.type.force` for that. | ||
|
||
```ucm | ||
project/main> debug.alias.type.force lib.builtins.Int Foo | ||
project/main> ls | ||
``` | ||
|
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,44 @@ | ||
`alias.type` makes a new name for a type. | ||
|
||
```ucm | ||
project/main> alias.type lib.builtins.Nat Foo | ||
Done. | ||
project/main> ls | ||
1. Foo (builtin type) | ||
2. lib/ (643 terms, 92 types) | ||
``` | ||
It won't create a conflicted name, though. | ||
|
||
```ucm | ||
project/main> alias.type lib.builtins.Int Foo | ||
⚠️ | ||
A type by that name already exists. | ||
``` | ||
```ucm | ||
project/main> ls | ||
1. Foo (builtin type) | ||
2. lib/ (643 terms, 92 types) | ||
``` | ||
You can use `debug.alias.type.force` for that. | ||
|
||
```ucm | ||
project/main> debug.alias.type.force lib.builtins.Int Foo | ||
Done. | ||
project/main> ls | ||
1. Foo (builtin type) | ||
2. Foo (builtin type) | ||
3. lib/ (643 terms, 92 types) | ||
``` |