summaryrefslogtreecommitdiff
path: root/docs/type_system
diff options
context:
space:
mode:
Diffstat (limited to 'docs/type_system')
-rw-r--r--docs/type_system/enum.md6
-rw-r--r--docs/type_system/fn.md2
-rw-r--r--docs/type_system/group.md36
-rw-r--r--docs/type_system/index.md8
-rw-r--r--docs/type_system/overload.md2
-rw-r--r--docs/type_system/tuple.md25
-rw-r--r--docs/type_system/union.md12
7 files changed, 58 insertions, 33 deletions
diff --git a/docs/type_system/enum.md b/docs/type_system/enum.md
index 4abcdb2..4762389 100644
--- a/docs/type_system/enum.md
+++ b/docs/type_system/enum.md
@@ -5,9 +5,9 @@
A symbol associated with a type
```text
-Enum[.name; ...] // Resoves to Enum[Void; ...]
+Enum[Collection[.symbol]] // Resoves to Enum[Void; ...]
-Enum[TYPE; .name; ...]
+Enum[TYPE; Collection[.symbol]]
-Enum[TYPE; .name : VALUE; ...]
+Enum[TYPE; Collection[.symbol : VALUE]]
```
diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md
index c5c1ba7..1bf88c5 100644
--- a/docs/type_system/fn.md
+++ b/docs/type_system/fn.md
@@ -10,7 +10,7 @@ Fn_class `alias Enum[
.regex
]
-Fn[Fn_class; RETURN_TYPE; List[ARGS]; STATE; List]
+Fn[Fn_class; RETURN_TYPE; Collection[ARGS]; STATE; List]
Fn[Fn_class; RETURN_TYPE; ARGS...]
Fn[RETURN_TYPE; ARGS...]
diff --git a/docs/type_system/group.md b/docs/type_system/group.md
new file mode 100644
index 0000000..45e7dcb
--- /dev/null
+++ b/docs/type_system/group.md
@@ -0,0 +1,36 @@
+# Group
+
+---
+
+A sequence of different types accessed by index or a symbol mapped to an index
+
+```text
+Group_access `alias Enum[.index; .symbol]
+Group[Tuple_access; Collection[TYPE.SYMBOL]]
+```
+
+# Alias
+
+```text
+Tuple[Collection[TYPE.SYMBOL]] `alias Group[.index; Collection[TYPE.SYMBOL]]
+
+Table[Collection[TYPE.SYMBOL]] `alias Group[.symbol; Collection[TYPE.SYMBOL]]
+```
+
+# Operators
+
+## ``get`
+
+## ``set`
+
+```text
+Result[Void] : target `set (KEY; VALUE)
+
+items : Tuple $ (1; 2; 3)
+items `set (0; 4)
+`log items // Tuple[I64; I64; I64] $ (4; 2; 3)
+```
+
+# Destructuring
+
+# Mutating
diff --git a/docs/type_system/index.md b/docs/type_system/index.md
index eb788d4..ece02b1 100644
--- a/docs/type_system/index.md
+++ b/docs/type_system/index.md
@@ -26,6 +26,12 @@ A template by name only expands to all inner fields as `Any`
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
+
+This represents a spread after a type field
+
### Void
Denotes that a field that does not resolve to anything
@@ -38,7 +44,7 @@ Denotes that a field that does not resolve to anything
## Container Templates
-* #### [Tuple](./tuple.md)
+* #### [Group](./group.md)
* #### [Buffer](./buffer.md)
diff --git a/docs/type_system/overload.md b/docs/type_system/overload.md
index dff2327..11bf21d 100644
--- a/docs/type_system/overload.md
+++ b/docs/type_system/overload.md
@@ -5,7 +5,7 @@
List of complete functions, selected by signature
```text
-Overload[FN; ...]
+Overload[Collection[FNS]]
```
## Example
diff --git a/docs/type_system/tuple.md b/docs/type_system/tuple.md
deleted file mode 100644
index fc1cdcb..0000000
--- a/docs/type_system/tuple.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Tuple
-
----
-
-A sequence of different types accessed by index or a symbol mapped to an index
-
-```text
-Tuple[TYPE; TYPE.SYMBOL; ...]
-```
-
-# Operators
-
-## ``get`
-
-## ``set`
-
-```text
-Result[Void] : target `set (KEY; VALUE)
-
-items : Tuple(1; 2; 3)
-items `set (0; 4)
-`log items // Tuple[I64; I64; I64] $ (4; 2; 3)
-```
-
-# Mutating
diff --git a/docs/type_system/union.md b/docs/type_system/union.md
index 2c4be2d..79c4987 100644
--- a/docs/type_system/union.md
+++ b/docs/type_system/union.md
@@ -5,11 +5,19 @@
```text
Union_class `alias Enum[.container; .transient]
-Union[Union_class; TYPE.symbol; ...]
+Union[Union_class; Collection[TYPE.SYMBOL]]
```
+# Alias
+
+```text
+Tag[Collection[TYPE.SYMBOL]] `alias Union[.container; Collection[TYPE.SYMBOL]]
+```
+
+## Tag Example
+
```text
-u : Union[I64.a; I64.b; I64.c] $ (.c : 5) // defaults to Union[.container; ...]
+u : Tag[I64.a; I64.b; I64.c] $ (.c : 5)
# u {
.c {[c] c ... }