unison/unison-src/transcripts/alias-type.output.md
Greg Pfeil 0031542faf
Add a space before code block info strings
This is for consistency with the `cmark` style. Now the blocks we still
pretty-print ourselves will match the bulk of them that `cmark`
produces.
2024-07-10 13:56:07 -06:00

45 lines
658 B
Markdown

`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)
```