From d4ff8cfd8c9d1881cfc672a10d1f787e633fffaa Mon Sep 17 00:00:00 2001 From: nodist Date: Wed, 13 May 2026 16:12:32 -0400 Subject: all functions return a task --- docs/type_system/fn.md | 4 ++-- docs/type_system/index.md | 4 ++-- docs/type_system/name.md | 2 +- docs/type_system/option.md | 43 ------------------------------------------ docs/type_system/qualifiers.md | 2 ++ docs/type_system/result.md | 28 ++++++++------------------- docs/type_system/task.md | 9 +++++++++ docs/type_system/var.md | 6 +++--- 8 files changed, 27 insertions(+), 71 deletions(-) delete mode 100644 docs/type_system/option.md create mode 100644 docs/type_system/task.md (limited to 'docs') diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md index e88fb7c..c5517da 100644 --- a/docs/type_system/fn.md +++ b/docs/type_system/fn.md @@ -3,7 +3,7 @@ --- ```text -Fn_class `alias Enum[.partial; .complete; .iterator; .closure; .bound; .task; .regex; .native] +Fn_class `alias Enum[.partial; .complete; .iterator; .closure; .bound; .regex; .native] -Fn[Fn_class; RETURN_TYPE; ARGS; STATE; CODE; List] +Fn[Fn_class; RETURN_TYPE; ARGS; STATE; List] ``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 80c32f4..d4a5c4f 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -36,8 +36,6 @@ Denotes that a field that does not resolve to anything ## Transient Templates -* #### [Option](./option.md) - * #### [Result](./result.md) * #### [Lock](./lock.md) @@ -64,6 +62,8 @@ Denotes that a field that does not resolve to anything * #### [Fn](./fn.md) +* #### [Task](./task.md) + * #### [Overload](./overload.md) ## AST Templates diff --git a/docs/type_system/name.md b/docs/type_system/name.md index d23b576..343232b 100644 --- a/docs/type_system/name.md +++ b/docs/type_system/name.md @@ -5,5 +5,5 @@ ```text Name_class `alias Enum[.unknown; .data; .alias; .unique] -Name[Name_class; TYPE; IDENTIFIER; SCOPE] +Name[Name_class; TYPE] ``` diff --git a/docs/type_system/option.md b/docs/type_system/option.md deleted file mode 100644 index 55e6b76..0000000 --- a/docs/type_system/option.md +++ /dev/null @@ -1,43 +0,0 @@ -# Option - ---- - -A 128bit status value pair, cannot be stored. - -An option represents not having a value is a possibility - -```text -Option[TYPE] -``` - -# Default - -```text -x : // something that returns an option -// x is the value from the option -``` - -If option is none an error is thrown - -## Use with `Empty` qualifier - -If the option is assigned to a type with `Empty`, no error is thrown. The empty value will be `nil` if the option is `none` - -# Matching - -```text -# ... { - .some { arg; ... }[arg] - .nome { ... } -} -``` - -## .some - -## .none - -# Return - -## \`some - -## \`none diff --git a/docs/type_system/qualifiers.md b/docs/type_system/qualifiers.md index 8a92086..fd7f590 100644 --- a/docs/type_system/qualifiers.md +++ b/docs/type_system/qualifiers.md @@ -22,3 +22,5 @@ Specifies that a container template can be NULL # Const # Ref + +# Pause diff --git a/docs/type_system/result.md b/docs/type_system/result.md index 4a496fe..1b62fcb 100644 --- a/docs/type_system/result.md +++ b/docs/type_system/result.md @@ -2,38 +2,26 @@ --- -A 128bit value error pair, cannot be stored. - -A result represents an operation should not fail +The "result" of an operation, can have data, have no data, or be an error ```text Result[TYPE] ``` -# Default - -```text -x : // something that returns a result -// x is the value from the result -``` - -If the result is an error, an error is thrown - # Matching ```text -# ... { - .ok { arg; ... }[arg] - .error { arg; ... }[arg] +# RESULT { + .some { arg ... }[arg] + .none { ... } + .error { e ... }[e] } ``` -## .ok - -## .error +# Returning -# Return +## \`some -## \`ok +## \`none ## \`error diff --git a/docs/type_system/task.md b/docs/type_system/task.md new file mode 100644 index 0000000..b00709d --- /dev/null +++ b/docs/type_system/task.md @@ -0,0 +1,9 @@ +# Task + +--- + +An asynchronous encapsulation + +```text +Task[TYPE] +``` diff --git a/docs/type_system/var.md b/docs/type_system/var.md index bea4f82..6fe78c2 100644 --- a/docs/type_system/var.md +++ b/docs/type_system/var.md @@ -2,10 +2,10 @@ --- -A unique identifier for a function +A unique identifier ```text -Var_class `alias Enum[.arg; .local] +Var_class `alias Enum[.arg; .local; .loop; .match] -Var[Var_class; TYPE; Value[U64;...]; FN] +Var[Var_class; TYPE; Value[U64;...]] ``` -- cgit v1.2.3