Prelude
The prelude is the automatically visible part of the standard library.
Keep this file declarative: each bare using names a sibling stdlib source file. The toolchain expands these imports in order when it builds or loads the prelude. Libraries absent from this list (for example FS and Regex) stay available through an explicit using.
Modules in the prelude
32 module(s), visible in every file with no import.
AlgebraBitsTheBitsmodule provides bitwise operations onInteger.BlankableConsoleANSI terminal styling. Color constants become empty strings when Kex is started with --no-colors, so callers can compose them without branching.DigestCryptographic content digests. Hex strings are used at the public boundary so Kex programs never need to handle backend-specific binary values.EnumerableEnvErrorableEvaluatorSandboxed evaluation of Kex source code at runtime.FileHandleHTTPIOKexListMapMathTheMathmodule provides standard mathematical constants and functions. All trigonometric functions operate in radians. A KexFloatis always finite, so a domain error (Math.sqrt(-1.0)) or an overflow (Math.exp(1000.0)) raises rather than producingNaNorInfinity— the same rule BEAM enforces, where those two values cannot exist at all.NumberOptionalOptionParserParserParses Kex source code into a structured AST at runtime.ProcessRangeStreamStringSystemTimeTestTaggedValidationDiagnostics returned by optional compile-time tagged-literal validators. Byte offsets are zero-based and relative to the cooked literal body.TruthyableTypeUnitsWebServer