summaryrefslogtreecommitdiff
path: root/docs/type_system
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-05-08 10:03:05 -0400
committernodist <kevin.comas.git@gmail.com>2026-05-08 10:03:05 -0400
commitdda8ef8f15662e7621251148eb1b1da7a22f199b (patch)
treee19492b2f5ac6710e20c53b09d64ce4e4aec7a3e /docs/type_system
parentf00fe3aaca06fb652ae51f44ce82289a4c3ccd5b (diff)
examples with unqiue and operators
Diffstat (limited to 'docs/type_system')
-rw-r--r--docs/type_system/alias.md2
-rw-r--r--docs/type_system/float.md10
-rw-r--r--docs/type_system/index.md16
-rw-r--r--docs/type_system/int.md24
-rw-r--r--docs/type_system/option.md37
-rw-r--r--docs/type_system/qualifiers.md2
-rw-r--r--docs/type_system/result.md37
-rw-r--r--docs/type_system/unique.md16
8 files changed, 117 insertions, 27 deletions
diff --git a/docs/type_system/alias.md b/docs/type_system/alias.md
index d6acd56..c98722b 100644
--- a/docs/type_system/alias.md
+++ b/docs/type_system/alias.md
@@ -3,3 +3,5 @@
---
A type based on a complete template that is interchangeable with what it is based on
+
+## \`alias
diff --git a/docs/type_system/float.md b/docs/type_system/float.md
index 9657d8d..da2771d 100644
--- a/docs/type_system/float.md
+++ b/docs/type_system/float.md
@@ -3,9 +3,9 @@
---
```text
-Float_bit_size : `alias Enum[.bit32; .bit64]
+Float_bit_size : `alias Enum[.bit32; .bit64; .bit_any]
-Float_representation : `alias Enum[.ieee; .fixed]
+Float_representation : `alias Enum[.binary; .octal; .decimal; .hex; .exponent]
Float[Float_bit_size; Float_representation]
```
@@ -13,8 +13,6 @@ Float[Float_bit_size; Float_representation]
## Alias
```text
-F32 : `alias Float[.bit32; .ieee]
-F64 : `alias Float[.bit64; .ieee]
-Fixed32 : `alias Float[.bit32; .fixed]
-Fixed64 : `alias Float[.bit64; .fixed]
+F32 `alias Float[.bit32; .decimal]
+F64 `alias Float[.bit64; .decimal]
```
diff --git a/docs/type_system/index.md b/docs/type_system/index.md
index 21168b9..acec8de 100644
--- a/docs/type_system/index.md
+++ b/docs/type_system/index.md
@@ -30,13 +30,11 @@ Denotes that a field that does not resolve to anything
## Transient Templates
-* #### Option
+* #### [Option](./option.md)
-* #### Result
+* #### [Result](./result.md)
-## Container Templates
-
-* #### String
+## Nullable Templates
* #### Tuple
@@ -52,9 +50,13 @@ Denotes that a field that does not resolve to anything
* #### Queue
+* #### Error
+
+## Container Templates
+
* #### Union
-* #### Namespace
+* #### Shared
## Function Templates
@@ -72,7 +74,7 @@ Denotes that a field that does not resolve to anything
## AST Templates
-* #### Literal
+* #### Token
* #### Value
diff --git a/docs/type_system/int.md b/docs/type_system/int.md
index 4e28660..c03df6b 100644
--- a/docs/type_system/int.md
+++ b/docs/type_system/int.md
@@ -3,9 +3,9 @@
---
```text
-Int_bit_size : `alias Enum[.bit8; .bit16; .bit32; .bit64]
+Int_bit_size : `alias Enum[.bit8; .bit16; .bit32; .bit64; .bit_any]
-Int_signedness : `alias Enum[.nosign; .unsigned; .signed; .bothsign]
+Int_signedness : `alias Enum[.nosign; .unsigned; .signed; .positive]
Int_representation : `alias Enum[.bool; .binary; .octal; .decimal; .hex; .utf8; .utf16; .utf32]
@@ -15,17 +15,17 @@ Int[Int_bit_size; Int_signedness; Int_representation]
## Alias
```text
-Bool : `alias Int[.bit8; .nosign; .bool]
+Bool `alias Int[.bit8; .nosign; .bool]
-Char : `alias Int[.bit32; .nosign; .utf8]
+Char `alias Int[.bit32; .nosign; .utf8]
-U8 : `alias Int[.bit8; .unsigned; .decimal]
-U16 : `alias Int[.bit16; .unsigned; .decimal]
-U32 : `alias Int[.bit32; .unsigned; .decimal]
-U64 : `alias Int[.bit64; .unsigned; .decimal]
+U8 `alias Int[.bit8; .unsigned; .decimal]
+U16 `alias Int[.bit16; .unsigned; .decimal]
+U32 `alias Int[.bit32; .unsigned; .decimal]
+U64 `alias Int[.bit64; .unsigned; .decimal]
-I8 : `alias Int[.bit8; .signed; .decimal]
-I16 : `alias Int[.bit16; .signed; .decimal]
-I32 : `alias Int[.bit32; .signed; .decimal]
-I64 : `alias Int[.bit64; .signed; .decimal]
+I8 `alias Int[.bit8; .signed; .decimal]
+I16 `alias Int[.bit16; .signed; .decimal]
+I32 `alias Int[.bit32; .signed; .decimal]
+I64 `alias Int[.bit64; .signed; .decimal]
```
diff --git a/docs/type_system/option.md b/docs/type_system/option.md
new file mode 100644
index 0000000..2532485
--- /dev/null
+++ b/docs/type_system/option.md
@@ -0,0 +1,37 @@
+# Option
+
+---
+
+A 128bit value status pair, cannot be stored.
+
+```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
+
+# 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 1db2e3a..9556d7f 100644
--- a/docs/type_system/qualifiers.md
+++ b/docs/type_system/qualifiers.md
@@ -9,5 +9,3 @@
## Lock
## Ref
-
-## Shared
diff --git a/docs/type_system/result.md b/docs/type_system/result.md
new file mode 100644
index 0000000..e33f04b
--- /dev/null
+++ b/docs/type_system/result.md
@@ -0,0 +1,37 @@
+# Result
+
+---
+
+A 128bit value error pair, cannot be stored.
+
+```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]
+}
+```
+
+## .ok
+
+## .error
+
+# Return
+
+## \`ok
+
+## \`error
diff --git a/docs/type_system/unique.md b/docs/type_system/unique.md
index 4503917..30d0812 100644
--- a/docs/type_system/unique.md
+++ b/docs/type_system/unique.md
@@ -3,3 +3,19 @@
---
A type based on a complete template or an alias that is not interchangeable with what it is based on
+
+## \`unique
+
+# Example
+
+```text
+Inches `unique U64
+
+Centimeters `unique U64
+
+i : Inches $ 1
+
+c : Centimeters $ 1
+
+i = c // Type Error
+```