summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/type_system/const.md3
-rw-r--r--docs/type_system/empty.md5
-rw-r--r--docs/type_system/error.md2
-rw-r--r--docs/type_system/fn.md14
-rw-r--r--docs/type_system/index.md16
-rw-r--r--docs/type_system/lock.md6
-rw-r--r--docs/type_system/qualifiers.md26
-rw-r--r--docs/type_system/ref.md3
-rw-r--r--docs/type_system/result.md22
-rw-r--r--docs/type_system/task.md21
-rw-r--r--docs/type_system/union.md11
-rw-r--r--mkdocs.yml7
12 files changed, 71 insertions, 65 deletions
diff --git a/docs/type_system/const.md b/docs/type_system/const.md
new file mode 100644
index 0000000..71c7aaf
--- /dev/null
+++ b/docs/type_system/const.md
@@ -0,0 +1,3 @@
+# Const
+
+---
diff --git a/docs/type_system/empty.md b/docs/type_system/empty.md
new file mode 100644
index 0000000..ac1f0bc
--- /dev/null
+++ b/docs/type_system/empty.md
@@ -0,0 +1,5 @@
+# Empty
+
+---
+
+Container type can be null
diff --git a/docs/type_system/error.md b/docs/type_system/error.md
index d06c5c2..dfe95b8 100644
--- a/docs/type_system/error.md
+++ b/docs/type_system/error.md
@@ -6,4 +6,6 @@ An error for reporting, the data used to create it cannot be accessed
```text
Error
+
+e : Error $ "This is a string error"
```
diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md
index e6a726a..64c49db 100644
--- a/docs/type_system/fn.md
+++ b/docs/type_system/fn.md
@@ -8,6 +8,20 @@ Fn_class `alias Enum[.partial; .complete; .iterator; .closure; .bound; .regex; .
Fn[Fn_class; RETURN_TYPE; ARGS; STATE; List]
```
+# Returning
+
## \`return
## \`yield
+
+## \`error
+
+# Calling
+
+## \`async
+
+## \`sync
+
+```text
+fn `sync args // `await fn `async args
+```
diff --git a/docs/type_system/index.md b/docs/type_system/index.md
index d4a5c4f..3e04b05 100644
--- a/docs/type_system/index.md
+++ b/docs/type_system/index.md
@@ -34,12 +34,6 @@ Denotes that a field that does not resolve to anything
* #### [Float](./float.md)
-## Transient Templates
-
-* #### [Result](./result.md)
-
-* #### [Lock](./lock.md)
-
## Container Templates
* #### [Tuple](./tuple.md)
@@ -56,6 +50,16 @@ Denotes that a field that does not resolve to anything
* #### [Error](./error.md)
+## Qualifier Templates
+
+* #### [Const](./const.md)
+
+* #### [Empty](./empty.md)
+
+* #### [Lock](./lock.md)
+
+* #### [Ref](./ref.md)
+
## Function Templates
* #### [Var](./var.md)
diff --git a/docs/type_system/lock.md b/docs/type_system/lock.md
index 0b82088..8a3c54b 100644
--- a/docs/type_system/lock.md
+++ b/docs/type_system/lock.md
@@ -1,9 +1,3 @@
# Lock
---
-
-Prevents NAME from being modified while TYPE is accessed as a Ref
-
-```text
-Lock[Name; Ref[TYPE]]
-```
diff --git a/docs/type_system/qualifiers.md b/docs/type_system/qualifiers.md
deleted file mode 100644
index fd7f590..0000000
--- a/docs/type_system/qualifiers.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Qualifiers
-
----
-
-Only one can be applied to a type at a time
-
-# Empty
-
-Specifies that a container template can be NULL
-
-```text
-# EMPTY {
- .some { args; ... }[args]
- .none { ... }
-}
-
-? EMPTY { args; .... }[args]
-```
-
-## \`nil
-
-# Const
-
-# Ref
-
-# Pause
diff --git a/docs/type_system/ref.md b/docs/type_system/ref.md
new file mode 100644
index 0000000..282dbf2
--- /dev/null
+++ b/docs/type_system/ref.md
@@ -0,0 +1,3 @@
+# Ref
+
+---
diff --git a/docs/type_system/result.md b/docs/type_system/result.md
deleted file mode 100644
index c181a46..0000000
--- a/docs/type_system/result.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Result
-
----
-
-The "result" of an operation, can have data, have no data, the end of an iterator or an error
-
-```text
-Result_status `alias [.some; .none; .done; .error]
-
-Result[TYPE]
-```
-
-## Matching
-
-```text
-# RESULT {
- .some { arg ... }[arg]
- .none { ... }
- .done { ... }
- .error { e ... }[e]
-}
-```
diff --git a/docs/type_system/task.md b/docs/type_system/task.md
index b00709d..099ac19 100644
--- a/docs/type_system/task.md
+++ b/docs/type_system/task.md
@@ -5,5 +5,24 @@
An asynchronous encapsulation
```text
-Task[TYPE]
+Task[TYPE; Error]
```
+
+## \`await
+
+```
+v : `await task // value is in v or error is thrown
+```
+
+# Matching
+
+```text
+# `await task {
+ .value { v ... }[v]
+ .error { e ... }[e]
+}
+```
+
+## .value
+
+## .error
diff --git a/docs/type_system/union.md b/docs/type_system/union.md
index 2fde486..57eedb4 100644
--- a/docs/type_system/union.md
+++ b/docs/type_system/union.md
@@ -3,5 +3,14 @@
---
```text
-Union[TYPE.SYMBOL; ...]
+Union[TYPE.symbol; ...]
+```
+
+```text
+u : Union[I64.a; I64.b; I64.c] $ (.c : 5)
+
+# u {
+ .c { c ... }[c]
+ { ... } // default
+}
```
diff --git a/mkdocs.yml b/mkdocs.yml
index 5011f46..b5f7d1d 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -11,15 +11,12 @@ nav:
- Cast: 'syntax/cast.md'
- Type System:
- Templates: 'type_system/index.md'
- - Qualifiers: 'type_system/qualifiers.md'
- Alias: 'type_system/alias.md'
- Unique: 'type_system/unique.md'
- Enum: 'type_system/enum.md'
- Flag: 'type_system/flag.md'
- Int: 'type_system/int.md'
- Float: 'type_system/float.md'
- - Result: 'type_system/result.md'
- - Lock: 'type_system/lock.md'
- Tuple: 'type_system/tuple.md'
- Buffer: 'type_system/buffer.md'
- Map: 'type_system/map.md'
@@ -27,6 +24,10 @@ nav:
- Union: 'type_system/union.md'
- Shared: 'type_system/shared.md'
- Error: 'type_system/error.md'
+ - Const: 'type_system/const.md'
+ - Empty: 'type_system/empty.md'
+ - Lock: 'type_system/lock.md'
+ - Ref: 'type_system/ref.md'
- Var: 'type_system/var.md'
- Fn: 'type_system/fn.md'
- Task: 'type_system/task.md'