diff options
Diffstat (limited to 'docs/type_system')
| -rw-r--r-- | docs/type_system/bits.md | 51 | ||||
| -rw-r--r-- | docs/type_system/const.md | 2 | ||||
| -rw-r--r-- | docs/type_system/float.md | 18 | ||||
| -rw-r--r-- | docs/type_system/fn.md | 2 | ||||
| -rw-r--r-- | docs/type_system/index.md | 10 | ||||
| -rw-r--r-- | docs/type_system/int.md | 31 | ||||
| -rw-r--r-- | docs/type_system/lock.md | 4 | ||||
| -rw-r--r-- | docs/type_system/ref.md | 4 | ||||
| -rw-r--r-- | docs/type_system/union.md | 2 |
9 files changed, 70 insertions, 54 deletions
diff --git a/docs/type_system/bits.md b/docs/type_system/bits.md new file mode 100644 index 0000000..122500c --- /dev/null +++ b/docs/type_system/bits.md @@ -0,0 +1,51 @@ +# Bits + +--- + +A sequence of bits that can fit into a register + +```text +Bits_size `alias Enum[.bit_any; .bit8; .bit16; .bit32; .bit64; .bit80; .bit128] + +Bits_representation `alias Enum[ + .numeric; .float; .int; .int_unsiged; .int_signed + .ascii; .utf8; .utf16; .utf32 + .bool + .mask +] + +Bits[Bits_size; Bits_representation] +``` + +## Alias + +```text +Number `alias Bits[.bit_any; .numeric] + +Int `alias Bits[.bit_any; .int] + +Int_unsiged `alias Bits[.bit_any; .int_unsiged] + +U8 `alias Bits[.bit8; .int_unsiged] +U16 `alias Bits[.bit16; .int_unsiged] +U32 `alias Bits[.bit32; .int_unsiged] +U64 `alias Bits[.bit64; .int_unsiged] + +Int_signed `alias Bits[.bit_any; .int_signed] + +I8 `alias Bits[.bit8; .int_signed] +I16 `alias Bits[.bit16; .int_signed] +I32 `alias Bits[.bit32; .int_signed] +I64 `alias Bits[.bit64; .int_signed] + +Float `alias Bits[.bit_any; .float] + +F32 `alias Bits[.bit32; .float] +F64 `alias Bits[.bit64; .float] + +Char `alias Bits[.bit32; .utf8] + +Bool `alias Bits[.bit8; .bool] + +Mask `alias Bits[.bit64; .mask] +``` diff --git a/docs/type_system/const.md b/docs/type_system/const.md index 71c7aaf..2e32853 100644 --- a/docs/type_system/const.md +++ b/docs/type_system/const.md @@ -1,3 +1,5 @@ # Const --- + +Cannot be changed or mutated diff --git a/docs/type_system/float.md b/docs/type_system/float.md deleted file mode 100644 index da2771d..0000000 --- a/docs/type_system/float.md +++ /dev/null @@ -1,18 +0,0 @@ -# Float - ---- - -```text -Float_bit_size : `alias Enum[.bit32; .bit64; .bit_any] - -Float_representation : `alias Enum[.binary; .octal; .decimal; .hex; .exponent] - -Float[Float_bit_size; Float_representation] -``` - -## Alias - -```text -F32 `alias Float[.bit32; .decimal] -F64 `alias Float[.bit64; .decimal] -``` diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md index 458719a..78c7918 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; .regex; .native] +Fn_class `alias Enum[.partial; .native; .process; .iterator; .closure; .bound; .regex] Fn[Fn_class; RETURN_TYPE; ARGS; STATE; List] ``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 88dc5e3..266f176 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -20,6 +20,12 @@ If a field in a template is not filed, one of these are required: Denotes a field in a template that has not resolved +A template by name only expands to all inner fields as `Any` + +```text +Int -> Int[Any; Any; Any] +``` + ##### Is[TYPE; ...] Denotes the type is one of the specified types in the list @@ -32,9 +38,7 @@ Denotes that a field that does not resolve to anything * #### [Enum](./enum.md) -* #### [Int](./int.md) - -* #### [Float](./float.md) +* #### [Bits](./bits.md) ## Container Templates diff --git a/docs/type_system/int.md b/docs/type_system/int.md deleted file mode 100644 index 97a871f..0000000 --- a/docs/type_system/int.md +++ /dev/null @@ -1,31 +0,0 @@ -# Int - ---- - -```text -Int_bit_size : `alias Enum[.bit8; .bit16; .bit32; .bit64; .bit_any] - -Int_signedness : `alias Enum[.nosign; .unsigned; .signed; .positive] - -Int_representation : `alias Enum[.bool; .mask; .binary; .octal; .decimal; .hex; .utf8; .utf16; .utf32] - -Int[Int_bit_size; Int_signedness; Int_representation] -``` - -## Alias - -```text -Bool `alias Int[.bit8; .nosign; .bool] - -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] - -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/lock.md b/docs/type_system/lock.md index 8a3c54b..86effac 100644 --- a/docs/type_system/lock.md +++ b/docs/type_system/lock.md @@ -1,3 +1,7 @@ # Lock --- + +```text +Lock[Name[...]; TYPE] +``` diff --git a/docs/type_system/ref.md b/docs/type_system/ref.md index 282dbf2..0d872c7 100644 --- a/docs/type_system/ref.md +++ b/docs/type_system/ref.md @@ -1,3 +1,7 @@ # Ref --- + +```text +Ref[TYPE] +``` diff --git a/docs/type_system/union.md b/docs/type_system/union.md index 81a3ecb..b2a7e45 100644 --- a/docs/type_system/union.md +++ b/docs/type_system/union.md @@ -42,7 +42,7 @@ When a transient union is assigned the first type specified is moved out. 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[...]] +z : x / y // Result[...] z // is value if y is not zero ``` ## Operators |
