ava/definitions.md

29 lines
789 B
Markdown

# Definitions
_Definitions_ are Ava constructs that may live at the top level within some
namespace. [Functions](functions.md) in particular may _also_ live within type
class (and instance) definitions.
## Syntax
All definitions adhere to the following syntax:
```
[export] <definition type> <name> <description> is <body>
```
Each definition type ultimately controls the description and body. All
definition names adhere to standard [Name](names.md) rules.
## Supported Definition Types
TODO: This whole document... can go away? Need inventory of keywords.
- [`const`](constants.md)
- [`record`](records.md)
- [`type`](types.md)
- [`alias`](type-aliases.md)
- [`class`](type-classes.md)
- [`instance`](type-classes.md#instances)
- [`enum`](enumerations.md)
- [`fn`](functions.md)