mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
28 lines
351 B
Markdown
28 lines
351 B
Markdown
```ucm:hide
|
|
scratch/main> alias.type ##Text builtin.Text
|
|
```
|
|
|
|
```unison:hide
|
|
unique type A = A Text
|
|
|
|
foo : A
|
|
foo = A "foo!"
|
|
|
|
bar : Text -> A
|
|
bar = A
|
|
|
|
baz : A -> Text
|
|
baz = cases
|
|
A t -> t
|
|
```
|
|
|
|
```ucm
|
|
scratch/main> add
|
|
scratch/main> find : Text -> A
|
|
scratch/main> find : A -> Text
|
|
scratch/main> find : A
|
|
```
|
|
```ucm:error
|
|
scratch/main> find : Text
|
|
```
|