Stdlib module core/types.vitl

This page is a wiki-style reference for one concrete stdlib file. It explains what the file owns, where it fits in the family, and how to decide whether this is the right surface to depend on.

Visual portrait of core/types.vitl
Wiki-style portrait for core/types.vitl.

Family: core

Kind: public stdlib surface

Page style: this reference follows the same “encyclopedic card + portrait + usage contract” logic as the keyword pages, but for stdlib modules.

Summary

Overview

FieldValue
Pathcore/types.vitl
Familycore
Kindpublic stdlib surface
Line count393
Declared procedures33
Declared forms/picks5

`core/types.vitl` is a public stdlib surface inside the `core` family. It should be read as one focused slice of the broader family responsibility: Portable low-level building blocks: types, strings, memory helpers, panic/runtime-adjacent basics, and reusable utility routines.

Purpose

This file should be chosen because of responsibility, not because its name “sounds close enough”. Inside the core family, it carries one focused part of the contract and keeps that responsibility separate from neighboring concerns.

  • A manifest validator stores names and counters with `core` types.
  • A pure helper normalizes a string or integer without touching host state.
  • The same helper can be reused in compiler code, stdlib code, and user code.

Taxonomy

Think of this page as a generated encyclopedia entry rather than a hand-written tutorial. The goal is to show what kind of module this is, how dense it is, and what reading strategy makes sense before depending on it.

  • Large algorithm surface: this file exposes many procedures and likely acts as a domain toolkit rather than a single thin wrapper.
  • Owns domain vocabulary: the module declares data shapes in addition to executable helpers, so its types are part of the contract.
  • Minimal top-level dependencies: the module reads as mostly self-contained from its opening declarations.
  • Explicit export surface: the file ends with visible export declarations instead of relying only on implicit namespace discovery.

Implementation profile

This profile is inferred directly from the source text. It does not replace reading the file, but it tells you quickly whether the module is mostly declarative, loop-heavy, branch-heavy, or organized around many small exits.

SignalCountWhat it suggests
if13Branching density and local decision-making.
while0Loop-heavy or iterative implementation style.
for0Collection-style traversal at source level.
match0Variant-driven branching or grammar-style decoding.
let11Local state and intermediate value density.
give46Number of explicit exit points and result shaping.

Top-level API inventory

SurfaceItems
Procedurestype_field, type_parameter, type_info, type_check_result, void_type, bool_type, char_type, string_type, i32_type, i64_type, u32_type, u64_type
FormsTypeField, TypeParameter, TypeInfo, TypeCheckResult
PicksTypeKind
Constantsnone declared at top level
Exports*

Imported surfaces

This file does not advertise a top-level `use` surface in its opening declarations. That often means it is either self-contained or an aggregation layer.

Position in family

This file is module 8 of 9 in the core family when ordered by path. By procedure count it ranks 2, and by line count it ranks 3. Those ranks are useful as rough signals of breadth, not as quality judgments.

Declaration map

The declaration map turns raw source into a scan-friendly catalog. It is useful when the file is large enough that a reader wants to orient by kinds of surfaces first.

LineNameKindRole
1vitte/stdlib/core/typesspaceDeclares the namespace that anchors this file in the stdlib tree.
5TypeKindpickIntroduces a tagged variant type used to model distinct outcomes.
21TypeFieldformIntroduces a structured data shape that other procedures can exchange.
28TypeParameterformIntroduces a structured data shape that other procedures can exchange.
33TypeInfoformIntroduces a structured data shape that other procedures can exchange.
43TypeCheckResultformIntroduces a structured data shape that other procedures can exchange.
49type_fieldprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
58type_parameterprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
65type_infoprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
77type_check_resultprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
85void_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
94bool_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
103char_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
112string_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
121i32_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
134i64_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
147u32_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
156u64_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
165f32_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
174f64_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
183pointer_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
192array_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
201function_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
210struct_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
223enum_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
232generic_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
245add_fieldprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
253add_parameterprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
261type_nameprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
265type_sizeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
269type_alignprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
273field_countprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
277parameter_countprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
281signed_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
285same_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
291check_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
307type_kind_nameprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
359format_typeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
365types_selftestprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.

The table is exhaustive for top-level declarations of the selected kinds. This file declares 39 matching surfaces.

Representative signatures

These signatures are shown in source order so the page keeps the feel of a reference manual, not just a keyword cloud.

  • pick TypeKind { (line 5)
  • form TypeField { (line 21)
  • form TypeParameter { (line 28)
  • form TypeInfo { (line 33)
  • form TypeCheckResult { (line 43)
  • proc type_field(name: string, field_type: string, offset: u64, size: u64) -> TypeField { (line 49)
  • proc type_parameter(name: string, constraint: string) -> TypeParameter { (line 58)
  • proc type_info(kind: TypeKind, name: string, size: u64, align: u64) -> TypeInfo { (line 65)
  • proc type_check_result(valid: bool, expected: string, actual: string) -> TypeCheckResult { (line 77)
  • proc void_type() -> TypeInfo { (line 85)
  • proc bool_type() -> TypeInfo { (line 94)
  • proc char_type() -> TypeInfo { (line 103)
  • proc string_type() -> TypeInfo { (line 112)
  • proc i32_type() -> TypeInfo { (line 121)
  • proc i64_type() -> TypeInfo { (line 134)
  • proc u32_type() -> TypeInfo { (line 147)
  • proc u64_type() -> TypeInfo { (line 156)
  • proc f32_type() -> TypeInfo { (line 165)

The list is intentionally capped here; the source file declares 38 matching signatures in total.

How to use this module

Start by reading the file as an ownership boundary. Ask three questions: what enters this module, what stable types or procedures it exports, and what adjacent module should stay outside of it.

  1. Read space and top-level imports first so the ownership boundary of core/types.vitl is explicit.
  2. Read declared forms and picks before algorithms so the data vocabulary is stable in your head.
  3. Traverse procedures in source order; the early helpers usually explain the naming and numeric conventions used later.
  4. Only after that compare neighbor modules, because the right boundary choice matters more than memorizing one helper name.

User example

This example is generated from the actual stdlib module surface. Its job is not to be the smallest snippet possible; its job is to show a realistic consumer-shaped file that exercises the module and mirrors the language keywords the module itself relies on.

space demo/core_types
form UserReport {
  label: string,
  ready: bool
}
pick UserOutcome {
  case Ready(message: string)
  case Empty(reason: string)
}
proc run_example() -> UserOutcome {
  let result = type_field("sample", "sample", u64(), u64())
  let ready: bool = signed_type(TypeInfo())
  let failed: bool = false
  let stable: bool = ready and true
  let retries: int = 0
  set retries = retries + 1
  if ready {
    give UserOutcome.Empty("module not ready")
  }
    give UserOutcome.Ready("ok")
}
export run_example

Keyword coverage

This table makes the “all keywords of the module” requirement auditable. It compares the detected Vitte keywords in the source file with the generated consumer example above.

KeywordPresent in module sourceUsed in generated user example
spaceyesyes
formyesyes
pickyesyes
procyesyes
letyesyes
setyesyes
ifyesyes
giveyesyes
exportyesyes
trueyesyes
falseyesyes
andyesyes

The generated snippet exercises every detected Vitte keyword used by this module.

Source shape

space vitte/stdlib/core/types
export *
pick TypeKind {
    Unknown
    Void
    Bool
    Char
    String
    Int
    Float

The excerpt is not meant to replace the file. It exists to make the module recognizable at first glance, the same way a Wikipedia infobox helps the reader orient before reading the whole article.

Source landmarks

Large files are easier to retain when they have visible landmarks. When the source contains explicit section banners, they are surfaced here; otherwise the first major declarations are used as anchors.

  • Line 1: space vitte/stdlib/core/types
  • Line 3: export *
  • Line 5: pick TypeKind {
  • Line 21: form TypeField {
  • Line 28: form TypeParameter {
  • Line 33: form TypeInfo {
  • Line 43: form TypeCheckResult {
  • Line 49: proc type_field(name: string, field_type: string, offset: u64, size: u64) -> TypeField {

Source organization

When a file carries its own internal chaptering, those chapters usually reveal the intended reading order better than a flat symbol list. This section reconstructs that organization from the source itself.

File surfaces

Top-level items: 40. Procedures: 33. Data surfaces: 5. Constants: 0.

First visible names: vitte/stdlib/core/types, *, TypeKind, TypeField, TypeParameter, TypeInfo, TypeCheckResult, type_field, type_parameter, type_info

Complete API catalog

This catalog is the exhaustive file-level index for the module. It is intentionally closer to a generated encyclopedia appendix than to a tutorial summary.

Data surfaces

LineNameSignatureRole
5TypeKindpick TypeKind {Introduces a tagged variant type used to model distinct outcomes.
21TypeFieldform TypeField {Introduces a structured data shape that other procedures can exchange.
28TypeParameterform TypeParameter {Introduces a structured data shape that other procedures can exchange.
33TypeInfoform TypeInfo {Introduces a structured data shape that other procedures can exchange.
43TypeCheckResultform TypeCheckResult {Introduces a structured data shape that other procedures can exchange.

Procedures

LineNameSignatureRole
49type_fieldproc type_field(name: string, field_type: string, offset: u64, size: u64) -> TypeField {Represents one top-level surface in the file contract and should be read as part of the module boundary.
58type_parameterproc type_parameter(name: string, constraint: string) -> TypeParameter {Represents one top-level surface in the file contract and should be read as part of the module boundary.
65type_infoproc type_info(kind: TypeKind, name: string, size: u64, align: u64) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
77type_check_resultproc type_check_result(valid: bool, expected: string, actual: string) -> TypeCheckResult {Represents one top-level surface in the file contract and should be read as part of the module boundary.
85void_typeproc void_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
94bool_typeproc bool_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
103char_typeproc char_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
112string_typeproc string_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
121i32_typeproc i32_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
134i64_typeproc i64_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
147u32_typeproc u32_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
156u64_typeproc u64_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
165f32_typeproc f32_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
174f64_typeproc f64_type() -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
183pointer_typeproc pointer_type(name: string) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
192array_typeproc array_type(name: string, size: u64) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
201function_typeproc function_type(name: string) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
210struct_typeproc struct_type(name: string, fields: [TypeField]) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
223enum_typeproc enum_type(name: string) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
232generic_typeproc generic_type(name: string, parameters: [TypeParameter]) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
245add_fieldproc add_field(info: TypeInfo, field: TypeField) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
253add_parameterproc add_parameter(info: TypeInfo, parameter: TypeParameter) -> TypeInfo {Represents one top-level surface in the file contract and should be read as part of the module boundary.
261type_nameproc type_name(info: TypeInfo) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
265type_sizeproc type_size(info: TypeInfo) -> u64 {Represents one top-level surface in the file contract and should be read as part of the module boundary.
269type_alignproc type_align(info: TypeInfo) -> u64 {Represents one top-level surface in the file contract and should be read as part of the module boundary.
273field_countproc field_count(info: TypeInfo) -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
277parameter_countproc parameter_count(info: TypeInfo) -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
281signed_typeproc signed_type(info: TypeInfo) -> bool {Represents one top-level surface in the file contract and should be read as part of the module boundary.
285same_typeproc same_type(left: TypeInfo, right: TypeInfo) -> bool {Represents one top-level surface in the file contract and should be read as part of the module boundary.
291check_typeproc check_type(expected: TypeInfo, actual: TypeInfo) -> TypeCheckResult {Represents one top-level surface in the file contract and should be read as part of the module boundary.
307type_kind_nameproc type_kind_name(kind: TypeKind) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
359format_typeproc format_type(info: TypeInfo) -> string {Represents one top-level surface in the file contract and should be read as part of the module boundary.
365types_selftestproc types_selftest() -> bool {Represents one top-level surface in the file contract and should be read as part of the module boundary.

Exports

LineNameSignatureRole
3*export *Re-exports surfaces that the module wants to expose as part of its public boundary.

Integration boundaries

Within core, this file should remain focused. If a future helper changes the host boundary, scheduling boundary, or data-shape boundary, it probably belongs in a neighbor module instead of being added here by convenience.

  • Family responsibility: Portable low-level building blocks: types, strings, memory helpers, panic/runtime-adjacent basics, and reusable utility routines.
  • Family architecture role: Use `core` when the code should remain portable and unsurprising. It is the family you reach for before involving the filesystem, network, process table, or threading runtime.

Composition guidance

Choose this module when

  • Choose core/types.vitl when the main question is owned by this module rather than by transport, storage, orchestration, or user-interface code.
  • A manifest validator stores names and counters with `core` types.
  • A pure helper normalizes a string or integer without touching host state.
  • The same helper can be reused in compiler code, stdlib code, and user code.

Pause before extending it when

  • Avoid extending this file when the new helper mostly changes the boundary to host I/O, runtime coordination, or foreign integration instead of staying inside core.
  • Check nearby modules such as core/algorithms.vitl, core/concurrency.vitl, core/io_helpers.vitl before adding convenience wrappers here.

Relationship table

This table keeps the page closer to a real encyclopedia entry: a module is easier to understand when compared with its nearest alternatives in the same family.

NeighborProceduresData surfacesWhy compare it
core/algorithms.vitl182Shares the same family boundary but carries a distinct slice of responsibility.
core/concurrency.vitl328Shares the same family boundary but carries a distinct slice of responsibility.
core/io_helpers.vitl215Shares the same family boundary but carries a distinct slice of responsibility.
core/memory.vitl204Shares the same family boundary but carries a distinct slice of responsibility.
core/panic.vitl295Shares the same family boundary but carries a distinct slice of responsibility.
core/strings.vitl190Shares the same family boundary but carries a distinct slice of responsibility.
core/utils.vitl223Shares the same family boundary but carries a distinct slice of responsibility.
core.vitl13116Shares the same family boundary but carries a distinct slice of responsibility.

Neighbor modules