2024-06-26 22:31:30 +03:00
|
|
|
`alias.type` makes a new name for a type.
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-26 22:31:30 +03:00
|
|
|
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.
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-26 22:31:30 +03:00
|
|
|
project/main> alias.type lib.builtins.Int Foo
|
|
|
|
|
|
|
|
⚠️
|
|
|
|
|
|
|
|
A type by that name already exists.
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-26 22:31:30 +03:00
|
|
|
project/main> ls
|
|
|
|
|
|
|
|
1. Foo (builtin type)
|
|
|
|
2. lib/ (643 terms, 92 types)
|
|
|
|
|
|
|
|
```
|
|
|
|
You can use `debug.alias.type.force` for that.
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-26 22:31:30 +03:00
|
|
|
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)
|
|
|
|
|
|
|
|
```
|