2024-01-06 03:56:38 +03:00
|
|
|
# Type modifiers are optional, `unique` is the default.
|
2021-08-24 21:43:40 +03:00
|
|
|
|
|
|
|
```ucm:hide
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> builtins.merge
|
2021-08-24 21:43:40 +03:00
|
|
|
```
|
|
|
|
|
2024-01-06 03:56:38 +03:00
|
|
|
Types and abilities may be prefixed with either `unique` or `structural`. When left unspecified, `unique` is assumed.
|
2021-08-24 21:43:40 +03:00
|
|
|
|
2024-01-04 11:42:12 +03:00
|
|
|
```unison
|
2024-01-06 03:56:38 +03:00
|
|
|
type Abc = Abc
|
|
|
|
unique type Def = Def
|
|
|
|
structural type Ghi = Ghi
|
2021-08-24 21:43:40 +03:00
|
|
|
|
2024-01-06 03:56:38 +03:00
|
|
|
ability MyAbility where const : a
|
|
|
|
unique ability MyAbilityU where const : a
|
|
|
|
structural ability MyAbilityS where const : a
|
2021-08-24 21:43:40 +03:00
|
|
|
```
|