diff options
| -rw-r--r-- | docs/syntax/operators.md | 10 | ||||
| -rw-r--r-- | docs/type_system/fn.md | 3 | ||||
| -rw-r--r-- | docs/type_system/index.md | 4 | ||||
| -rw-r--r-- | docs/type_system/shared.md | 4 | ||||
| -rw-r--r-- | docs/type_system/union.md | 8 |
5 files changed, 20 insertions, 9 deletions
diff --git a/docs/syntax/operators.md b/docs/syntax/operators.md index d382bcc..51713d9 100644 --- a/docs/syntax/operators.md +++ b/docs/syntax/operators.md @@ -11,15 +11,17 @@ ## ``print` ```text -TO `print DATA +Result[I32] : Is[File; Void] `print DATA ``` -If `TO` is not specified the output is send to `STDOUT` +If no `File` is specified the output is send to `stdout` ## ``panic` -```test -`panic ANY +Stops execution and prints `Any` to `stdout` + +```text +`panic any ``` ## ``type` diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md index dce371d..458719a 100644 --- a/docs/type_system/fn.md +++ b/docs/type_system/fn.md @@ -21,7 +21,7 @@ Yielding wraps the value in the transient union `Next` Return `Void` to stop iteration ```text -fn : Fn[x] $ ( @ 1 .. x { `yield 2 * x } ) +fn : Fn[n] $ ( @ 1 .. n { `yield 2 * x }[x] ) it : fn `sync 10 // invoking @ it { `log v }[v] // 2 4 6 8 10 12 14 16 18 20 @@ -30,7 +30,6 @@ it : fn `sync 10 # `sync it { .value { `log v }[v] .done { `break } - .error { `return e }[e] } } ``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 95602c6..88dc5e3 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -20,6 +20,10 @@ If a field in a template is not filed, one of these are required: Denotes a field in a template that has not resolved +##### Is[TYPE; ...] + +Denotes the type is one of the specified types in the list + ##### Void Denotes that a field that does not resolve to anything diff --git a/docs/type_system/shared.md b/docs/type_system/shared.md index 9fc9c1d..3982b5e 100644 --- a/docs/type_system/shared.md +++ b/docs/type_system/shared.md @@ -3,5 +3,7 @@ --- ```text -Shared[TYPE] +Shared_collector `alias Enum[.counting; .tracing] + +Shared[Shared_collector; TYPE] ``` diff --git a/docs/type_system/union.md b/docs/type_system/union.md index 7d0c798..81a3ecb 100644 --- a/docs/type_system/union.md +++ b/docs/type_system/union.md @@ -28,14 +28,18 @@ Result[ANY] `alias Union[.transient; ANY.value; Error.error] Option[ANY] `alias Union[.transient; ANY.some; Void.none] -Next[Any] `alias Union[.transient; ANY.value; Void.done; Error.error] +Next[Any] `alias Union[.transient; ANY.iter; Void.done] + +Next_result[Any] `alias Union[.transient; ANY.value; Error.error; Void.done] + +Next_option[Any] `alias Union[.transient; ANY.some; Void.none; Void.done] ``` ## Default Operation When a transient union is assigned the first type specified is moved out. -If the type is not the first specified a result with an error is returned to the parent function +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[Int[...]] |
