From dcf57ffd19ee65c46e9ee635ca6f8238b8f1f07f Mon Sep 17 00:00:00 2001 From: nodist Date: Tue, 19 May 2026 15:45:45 -0400 Subject: use sync and async for calling --- docs/syntax/operators.md | 2 ++ docs/type_system/fn.md | 12 ++++++------ docs/type_system/overload.md | 6 +++--- docs/type_system/task.md | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'docs') diff --git a/docs/syntax/operators.md b/docs/syntax/operators.md index 91c1491..d382bcc 100644 --- a/docs/syntax/operators.md +++ b/docs/syntax/operators.md @@ -21,3 +21,5 @@ If `TO` is not specified the output is send to `STDOUT` ```test `panic ANY ``` + +## ``type` diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md index 0b8c844..dce371d 100644 --- a/docs/type_system/fn.md +++ b/docs/type_system/fn.md @@ -27,7 +27,7 @@ it : fn `sync 10 @ it { `log v }[v] // 2 4 6 8 10 12 14 16 18 20 // same as above @ { - # `call_sync it { + # `sync it { .value { `log v }[v] .done { `break } .error { `return e }[e] @@ -37,15 +37,15 @@ it : fn `sync 10 # Calling -## \`call_async +## \`async ```text -task : `call_async fn -value : `task_wait task +task : `async fn +value : `wait task ``` -## \`call_sync +## \`sync ```text -fn `call_sync args // `task_wait fn `call_async args +fn `sync args // `wait fn `async args ``` diff --git a/docs/type_system/overload.md b/docs/type_system/overload.md index c446701..dff2327 100644 --- a/docs/type_system/overload.md +++ b/docs/type_system/overload.md @@ -13,7 +13,7 @@ Overload[FN; ...] ```text add : Overload[Fn[.native; I64; Tuple[I64.x; I64.y]; ...]; Fn[.native; F64; Tuple[F64.x; F64.y]; ...]; ...] -`log add `call_sync (1; 2) // Valid calls first -`log add `call_sync (1.1; 2.2) // Valid calls second -`log add `call_sync (1; 2.2) // Invalid no signature match +`log add `sync (1; 2) // Valid calls first +`log add `sync (1.1; 2.2) // Valid calls second +`log add `sync (1; 2.2) // Invalid no signature match ``` diff --git a/docs/type_system/task.md b/docs/type_system/task.md index 5f8654d..10d06cc 100644 --- a/docs/type_system/task.md +++ b/docs/type_system/task.md @@ -10,4 +10,4 @@ Task_status `alias Enum[...] Task[Task_status; TYPE] ``` -## \`task_wait +## \`wait -- cgit v1.2.3