The core floor fixes construction, conversion, text scalar access, higher-order collection transforms, Option/Result helpers, and profile-gated testing without hidden coercion.
Canonical contract
Prelude constructors are Some, None, Ok, and Err; unsolved type variables require an expected type. print accepts a string only. toInt and related conversions use Option or declared failure values rather than exceptions. s.scalars() returns single-scalar strings; string .length remains absent. Free map, filter, and reduce consume only the fixed iterable families.
Public surface
The checked inventory extends the minimum with toIntRadix, fromCodePoint, toFloat, input, Math’s 13 members, string search/trim/split/slice/replace members, Option okOr/okOrElse/map/flatMap, Result map/flatMap, Bytes and Encoding conversions, hashes, structured format helpers, Date, BigInt, Decimal, and exact JSON decode heads.
Observable behavior
String operations use scalar or explicitly named byte semantics. Higher-order calls evaluate inputs and callbacks in defined collection order. Option.map and optional access preserve/flatten the Option model as specified; Result mapping does not turn faults into Err. Typed JSON requires one written fully known target and returns deterministic $-rooted decode paths on data failure.
Current support
Core names are checked statically, and the virtual std root exposes a fixed module surface. Host functions such as print and input are available only in environments that provide the required input and output capabilities.
Constraints and exclusions
Do not print non-strings without interpolation, infer an unconstrained None/empty collection, treat strings as arrays, assume user-defined Iterable, catch faults with Result helpers, decode recursive/open/imported nominal schemas, or expose test helpers on the public profile. assert is a function only in test-profile, never a language keyword.
Worked example
function parseAll(values: Array<string>) -> Array<Option<int>> {
return map(values, value => toInt(value))
}
let scalars = "토파즈".scalars()
let parsed = parseAll(["1", "x", "3"])
print("{scalars.length}:{parsed}")