summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/application/interface.md7
-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
5 files changed, 14 insertions, 19 deletions
diff --git a/docs/application/interface.md b/docs/application/interface.md
index e1c947a..887f7f7 100644
--- a/docs/application/interface.md
+++ b/docs/application/interface.md
@@ -43,9 +43,8 @@ typedef struct {
typedef enum : uint8_t {
KPL_STATUS_ERROR,
- KPL_STATUS_VALUE,
KPL_STATUS_NULL,
- KPL_STATUS_DONE
+ KPL_STATUS_VALUE
} kpl_status;
typedef struct {
@@ -55,11 +54,9 @@ typedef struct {
kpl_result kpl_result_error(error *er);
-kpl_result kpl_result_value(any value);
-
kpl_result kpl_result_null(void);
-kpl_result kpl_result_done(void);
+kpl_result kpl_result_value(any value);
typdef struct {
uint16_t slab_index, array_index;
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