summaryrefslogtreecommitdiff
path: root/docs/type_system
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-30 21:38:34 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-30 21:38:34 -0400
commit523649ed10f85bddcad574afa47abaf73d2b0a1e (patch)
tree6ee76cf7abcc9c2fa62b8c6b51c53483d5b222d5 /docs/type_system
parentdd9713497bfc9e27f9b1ff3181d34ee241f05ec8 (diff)
change to result and iteration unions
Diffstat (limited to 'docs/type_system')
-rw-r--r--docs/type_system/buffer.md2
-rw-r--r--docs/type_system/empty.md2
-rw-r--r--docs/type_system/function.md2
-rw-r--r--docs/type_system/union.md20
4 files changed, 12 insertions, 14 deletions
diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md
index dca8ab9..f351b4f 100644
--- a/docs/type_system/buffer.md
+++ b/docs/type_system/buffer.md
@@ -38,6 +38,8 @@ Array[Generic.T] `alias Buffer[[TYPE] Generic.T]
## ``pop`
+## ``reverse`
+
## ``join`
## ``split`
diff --git a/docs/type_system/empty.md b/docs/type_system/empty.md
index 2fae1e7..5903c19 100644
--- a/docs/type_system/empty.md
+++ b/docs/type_system/empty.md
@@ -8,7 +8,7 @@ Container type can be null
%empty
```
-## Use with `Option` Union
+## Use with `Result` Union
```text
make_array : ([yes]
diff --git a/docs/type_system/function.md b/docs/type_system/function.md
index af17b74..78abdf7 100644
--- a/docs/type_system/function.md
+++ b/docs/type_system/function.md
@@ -95,7 +95,7 @@ Invoked regular expression matcher
## \`yield
-Yielding wraps the value in the transient union `Next`
+Yielding wraps the value in the transient union `Iteration`
Return `Void` to stop iteration
diff --git a/docs/type_system/union.md b/docs/type_system/union.md
index 2572591..f4b0b04 100644
--- a/docs/type_system/union.md
+++ b/docs/type_system/union.md
@@ -3,7 +3,7 @@
---
```text
-Union[CONTAINER | TRANSIENT | TRANSIENT_GENERIC] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
+Union[TAG | TRANSIENT] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
```
## Type Body Object Definitions
@@ -17,7 +17,9 @@ typedef struct {
# Alias
```text
-Tag[Collection[VAR_TREE_LIST; TYPE.SYMBOL]] `alias Union[[CONTAINER] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
+Tag[Collection[VAR_TREE_LIST; TYPE.SYMBOL]] `alias Union[[TAG] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
+
+Transient[Collection[VAR_TREE_LIST; TYPE.SYMBOL]] `alias Union[[TRANSIENT] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
```
## Tag Example
@@ -37,22 +39,16 @@ u : Tag[I64.a; I64.b; I64.c] $ (.c : 5)
# Transient Unions
+Return multiple types from a function
+
Can only be retuned from functions and operations. The inner value must be moved out
## Alias
```text
-Transient_generic[Generic.T] `alias Union[[TRANSIENT_GENERIC] Generic.T.value]
-
-Result[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Error.error]
-
-Option[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Void.null]
-
-Next[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Void.done]
-
-Next_result[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Error.error; Void.done]
+Result[Generic.T] `alias Transient[Generic.T.value; Void.null; Error.error]
-Next_option[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Void.null; Void.done]
+Iteration[Generic.T] `alias Transient[Generic.T.value; Void.null; Void.done; Error.error]
```
## Default Operation