From d3a576f02b5d02245ce98741ffa6440ba5179cfb Mon Sep 17 00:00:00 2001 From: nodist Date: Mon, 11 May 2026 17:05:10 -0400 Subject: reduce number of types --- docs/type_system/action.md | 3 --- docs/type_system/array.md | 9 --------- docs/type_system/buffer.md | 12 +++++++----- docs/type_system/clause.md | 3 --- docs/type_system/define.md | 3 --- docs/type_system/error.md | 2 ++ docs/type_system/fn.md | 12 ++---------- docs/type_system/index.md | 32 +++++++++++--------------------- docs/type_system/list.md | 6 ++++++ docs/type_system/map.md | 6 ++++++ docs/type_system/name.md | 2 +- docs/type_system/namespace.md | 4 ++++ docs/type_system/overload.md | 5 +++++ docs/type_system/set.md | 7 ------- docs/type_system/state.md | 15 --------------- docs/type_system/table.md | 9 --------- docs/type_system/token.md | 3 --- docs/type_system/tuple.md | 4 ++-- docs/type_system/var.md | 4 +++- docs/type_system/vector.md | 9 --------- 20 files changed, 49 insertions(+), 101 deletions(-) delete mode 100644 docs/type_system/action.md delete mode 100644 docs/type_system/array.md delete mode 100644 docs/type_system/clause.md delete mode 100644 docs/type_system/define.md create mode 100644 docs/type_system/overload.md delete mode 100644 docs/type_system/set.md delete mode 100644 docs/type_system/state.md delete mode 100644 docs/type_system/table.md delete mode 100644 docs/type_system/token.md delete mode 100644 docs/type_system/vector.md (limited to 'docs') diff --git a/docs/type_system/action.md b/docs/type_system/action.md deleted file mode 100644 index ef049e5..0000000 --- a/docs/type_system/action.md +++ /dev/null @@ -1,3 +0,0 @@ -# Action - ---- diff --git a/docs/type_system/array.md b/docs/type_system/array.md deleted file mode 100644 index 2433cd5..0000000 --- a/docs/type_system/array.md +++ /dev/null @@ -1,9 +0,0 @@ -# Array - ---- - -A sequence of TYPES with known size - -```text -Array[TYPE; Value[Int[...]; ...]] -``` diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md index 5333cee..ae0c56b 100644 --- a/docs/type_system/buffer.md +++ b/docs/type_system/buffer.md @@ -2,16 +2,18 @@ --- -An sequence of bytes with unknown size and an encoding +An sequence of bytes with unknown size and a byte representation ```text -Buffer_encoding : Enum[.byte; .utf8; .utf16; .utf32] +Buffer_repesentation: Enum[.type; .utf8; .utf16; .utf32] -Buffer[Buffer_encoding] +Buffer[TYPE; Buffer_repesentation] ``` ## Alias -``` -String `alias Buffer[.utf8] +```text +String `alias Buffer[Void; .utf8] + +Vector[Any] `alias Buffer[Any; .type] ``` diff --git a/docs/type_system/clause.md b/docs/type_system/clause.md deleted file mode 100644 index 4ae8894..0000000 --- a/docs/type_system/clause.md +++ /dev/null @@ -1,3 +0,0 @@ -# Clause - ---- diff --git a/docs/type_system/define.md b/docs/type_system/define.md deleted file mode 100644 index e4e3baf..0000000 --- a/docs/type_system/define.md +++ /dev/null @@ -1,3 +0,0 @@ -# Define - ---- diff --git a/docs/type_system/error.md b/docs/type_system/error.md index c9e7dc6..d06c5c2 100644 --- a/docs/type_system/error.md +++ b/docs/type_system/error.md @@ -2,6 +2,8 @@ --- +An error for reporting, the data used to create it cannot be accessed + ```text Error ``` diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md index 5bdce1c..6706513 100644 --- a/docs/type_system/fn.md +++ b/docs/type_system/fn.md @@ -2,16 +2,8 @@ --- -## Definition - -```text -Fn[RETURN_TYPE; LIST(NAME[VAR...]; ...) BODY; CODE] -``` - -## Usage - ```text -Fn[TYPE; name; ...] +Fn_class `alias Enum[.partial; .complete; .iterator; .closure; .bound; .task; .native] -Fn[name; ...] // Resolves to Fn[Any; ...] +Fn[RETURN_TYPE; ARGS; SCOPE; STATE; CODE; Fn_class] ``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 8ef6b83..4cc3586 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -1,7 +1,13 @@ -# Templates +# Types + +* #### [Alias](./alias.md) + +* #### [Unique](./unique.md) --- +# Templates + A template is an incomplete type ```text @@ -40,18 +46,10 @@ Denotes that a field that does not resolve to anything * #### [Tuple](./tuple.md) -* #### [Table](./table.md) - * #### [Buffer](./buffer.md) -* #### [Array](./array.md) - -* #### [Vector](./vector.md) - * #### [Map](./map.md) -* #### [Set](./set.md) - * #### [Queue](./queue.md) * #### [Union](./union.md) @@ -62,32 +60,24 @@ Denotes that a field that does not resolve to anything ## Function Templates +* #### [Regex](./regex.md) + * #### [Var](./var.md) * #### [Fn](./fn.md) -* #### [State](./state.md) - -* #### [Regex](./regex.md) +* #### [Overload](./overload.md) ## AST Templates -* #### [Namespace](./namespace.md) - -* #### [Token](./token.md) - * #### [Value](./value.md) -* #### [Clause](./clause.md) - * #### [Name](./name.md) -* #### [Define](./define.md) - * #### [Symbol](./symbol.md) * #### [Op](./op.md) * #### [List](./list.md) -* #### [Action](./action.md) +* #### [Namespace](./namespace.md) diff --git a/docs/type_system/list.md b/docs/type_system/list.md index 19e4d19..fc5b0ff 100644 --- a/docs/type_system/list.md +++ b/docs/type_system/list.md @@ -1,3 +1,9 @@ # List --- + +A "List" of statements + +```text +List[TARGET; SCOPE; STATEMENTS ...] +``` diff --git a/docs/type_system/map.md b/docs/type_system/map.md index 4133bd5..e8c220e 100644 --- a/docs/type_system/map.md +++ b/docs/type_system/map.md @@ -5,3 +5,9 @@ ```text Map[KEY_TYPE; VALUE_TYPE] ``` + +## Alias + +```text +Set[Any] `alias Map[Void; Any] +``` diff --git a/docs/type_system/name.md b/docs/type_system/name.md index f137380..93dcddd 100644 --- a/docs/type_system/name.md +++ b/docs/type_system/name.md @@ -3,7 +3,7 @@ --- ```text -Name_class : Enum[.unknown; .data; .alias; .unique] +Name_class `alias Enum[.unknown; .data; .alias; .unique] Name[TYPE; Name_class; IDENTIFIER; SCOPE] ``` diff --git a/docs/type_system/namespace.md b/docs/type_system/namespace.md index 021173d..fc1d238 100644 --- a/docs/type_system/namespace.md +++ b/docs/type_system/namespace.md @@ -1,3 +1,7 @@ # Namespace --- + +A file with code + +## Exports diff --git a/docs/type_system/overload.md b/docs/type_system/overload.md new file mode 100644 index 0000000..142c20a --- /dev/null +++ b/docs/type_system/overload.md @@ -0,0 +1,5 @@ +# Overload + +--- + +List of complete functions, selected by signature diff --git a/docs/type_system/set.md b/docs/type_system/set.md deleted file mode 100644 index 51d3f2d..0000000 --- a/docs/type_system/set.md +++ /dev/null @@ -1,7 +0,0 @@ -# Set - ---- - -```text -Set[TYPE] -``` diff --git a/docs/type_system/state.md b/docs/type_system/state.md deleted file mode 100644 index c1318ff..0000000 --- a/docs/type_system/state.md +++ /dev/null @@ -1,15 +0,0 @@ -# State - ---- - -```text -State_class : Enum[.iterator; .closure; .task] - -State[STATE; FN; State_class] -``` - -# Iterator - -# Closure - -# Task diff --git a/docs/type_system/table.md b/docs/type_system/table.md deleted file mode 100644 index b94e07a..0000000 --- a/docs/type_system/table.md +++ /dev/null @@ -1,9 +0,0 @@ -# Table - ---- - -A sequence of different types accessed by symbol - -```text -Table[TYPE.SYMBOL; ...] -``` diff --git a/docs/type_system/token.md b/docs/type_system/token.md deleted file mode 100644 index 78863bb..0000000 --- a/docs/type_system/token.md +++ /dev/null @@ -1,3 +0,0 @@ -# Token - ---- diff --git a/docs/type_system/tuple.md b/docs/type_system/tuple.md index 81f482f..57158b1 100644 --- a/docs/type_system/tuple.md +++ b/docs/type_system/tuple.md @@ -2,8 +2,8 @@ --- -A sequence of different types accessed by index +A sequence of different types accessed by index or a symbol mapped to an index ```text -Tuple[TYPE; ...] +Tuple[TYPE; TYPE.SYMBOL; ...] ``` diff --git a/docs/type_system/var.md b/docs/type_system/var.md index bd41278..cc7c275 100644 --- a/docs/type_system/var.md +++ b/docs/type_system/var.md @@ -2,8 +2,10 @@ --- +A unique identifier for a function + ```text -Var_class: Enum[.arg; .local] +Var_class `alias Enum[.arg; .local] Var[TYPE; Var_class; Value[U64;...]; FN] ``` diff --git a/docs/type_system/vector.md b/docs/type_system/vector.md deleted file mode 100644 index e1f2e23..0000000 --- a/docs/type_system/vector.md +++ /dev/null @@ -1,9 +0,0 @@ -# Vector - ---- - -A sequence of TYPES with unknown size - -```text -Vector[TYPE] -``` -- cgit v1.2.3