2024-01-06 03:56:38 +03:00
|
|
|
# Type modifiers are optional, `unique` is the default.
|
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-07-10 17:46:18 +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
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2021-08-24 21:43:40 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2024-01-04 11:42:12 +03:00
|
|
|
I found and typechecked these definitions in scratch.u. If you
|
|
|
|
do an `add` or `update`, here's how your codebase would
|
|
|
|
change:
|
2021-08-24 21:43:40 +03:00
|
|
|
|
2024-01-04 11:42:12 +03:00
|
|
|
⍟ These new definitions are ok to `add`:
|
|
|
|
|
2024-01-06 03:56:38 +03:00
|
|
|
type Abc
|
|
|
|
type Def
|
|
|
|
structural type Ghi
|
2021-08-24 21:43:40 +03:00
|
|
|
(also named builtin.Unit)
|
2024-01-06 03:56:38 +03:00
|
|
|
ability MyAbility
|
2021-08-24 21:43:40 +03:00
|
|
|
structural ability MyAbilityS
|
2024-01-04 11:42:12 +03:00
|
|
|
ability MyAbilityU
|
2021-08-24 21:43:40 +03:00
|
|
|
|
|
|
|
```
|