summaryrefslogtreecommitdiff
path: root/docs/type_system/index.md
blob: 3601459b93c6e096ceba492173ef1faf3b098758 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Types

* #### [Alias](./alias.md)

* #### [Unique](./unique.md)

---

# Templates

A template is an incomplete type

```text
Template[Field; ...]
```

If a field in a template is not filed, one of these are required:

### Any

Denotes a field in a template that has not resolved

A template by name only expands to all inner fields as `Any`

## Generic.SYMBOL

Generic for alias and unique types, type is replaced with type passed

## Collection[TYPE]

A list of types with shape of TYPE, only can have one collection per type

If using a collection the Collection[TYPE] must be the last type on the templates type list

### Void

Denotes that a field that does not resolve to anything

## Value Templates

* #### [Enum](./enum.md)

* #### [Bit](./bit.md)

## Container Templates

* #### [Group](./group.md)

* #### [Buffer](./buffer.md)

* #### [Map](./map.md)

* #### [Queue](./queue.md)

* #### [Union](./union.md)

* #### [Native](./native.md)

* #### [Error](./error.md)

## Qualifier Templates

* #### [Const](./const.md)

* #### [Empty](./empty.md)

* #### [Ref](./ref.md)

* #### [Gc](./gc.md)

## Function Templates

* #### [Var](./var.md)

* #### [Function](./function.md)

* #### [Task](./task.md)

* #### [Overload](./overload.md)

## AST Templates

* #### [Value](./value.md)

* #### [Name](./name.md)

* #### [Symbol](./symbol.md)

* #### [Op](./op.md)

* #### [List](./list.md)

* #### [Lock](./lock.md)

* #### [Namespace](./namespace.md)