summaryrefslogtreecommitdiff
path: root/docs/type_system/union.md
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-07-27 17:17:56 -0400
committernodist <kevin.comas.git@gmail.com>2026-07-27 17:17:56 -0400
commitbb912b081ed339e4a5419bd3d2ffd7465f2f72d3 (patch)
tree7f34b3af1a72672de1d12c8e23dda419c398dce3 /docs/type_system/union.md
parent003119b9f285e5610f56186bce845441409265ae (diff)
bottom up redesign
Diffstat (limited to 'docs/type_system/union.md')
-rw-r--r--docs/type_system/union.md72
1 files changed, 0 insertions, 72 deletions
diff --git a/docs/type_system/union.md b/docs/type_system/union.md
deleted file mode 100644
index bf9f857..0000000
--- a/docs/type_system/union.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# Union
-
----
-
-```text
-Union[TAG | TRANSIENT] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
-```
-
-## Type Body Object Definitions
-
-```c
-typedef struct {
- kpl_type *var_tree, *var_list;
-} kpl_type_body_union;
-```
-
-# Alias
-
-```text
-Tag `definition Union[[TAG] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
-
-Transient `definition Union[[TRANSIENT] Collection[VAR_TREE_LIST; TYPE.SYMBOL]]
-```
-
-## Tag Example
-
-```text
-u : Tag[I64.a; I64.b; I64.c] $ (.c : 5)
-
-# u {
- .c {[c] c ... }
- { ... } // default
-}
-```
-
-# Operators
-
-## ``take`
-
-# 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
-Result[Generic.T] `alias Transient[Generic.T.value; Void.null; Error.error]
-
-Iteration[Generic.T] `alias Transient[Generic.T.value; Void.null; Void.done; Error.error]
-```
-
-## Default Operation
-
-When a transient union is assigned the first type specified is moved out.
-
-If no match is used and if the type is not the first specified a result with an error is returned
-
-```text
-z : x / y // Result[...]
-z // is value if y is not zero
-```
-## Operators
-
-### \`value
-
-### \`error
-
-### \`null
-
-Can take a TYPE as a parameter