runtime

package
v0.14.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package runtime provides helper functions for AILANG Go codegen. This is the canonical runtime for the Go backend - semantics defined here are the source of truth for compiled AILANG programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcatString

func ConcatString(a, b any) string

ConcatString concatenates two values as strings. This implements the AILANG ++ operator for strings.

func ConvertToInt64Slice

func ConvertToInt64Slice(v any) []int64

ConvertToInt64Slice converts []any to []int64. Used when ADT constructors expect [int] fields.

func ConvertToRecordSlice

func ConvertToRecordSlice(v any) []map[string]any

ConvertToRecordSlice converts []any to []map[string]any. Used when ADT constructors expect [{...}] record fields.

func ConvertToStringSlice

func ConvertToStringSlice(v any) []string

ConvertToStringSlice converts []any to []string. Used when ADT constructors expect [string] fields.

func Debug

func Debug(label string, value any) any

Debug prints a debug message with a label. Useful for debugging generated code.

func Log

func Log(msg any) any

Log prints a message to stdout and returns unit. This implements the AILANG log builtin for the IO effect.

func Show

func Show(v any) string

Show converts any AILANG value to its string representation. Handles the core AILANG types: int64, float64, string, bool. For other types, falls back to fmt.Sprintf("%v", v).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL