POLYTONE — the AI-native programming language

Error Lab

Every diagnostic below is the real output of ptc, not a mock-up. Pick a mistake, read how the compiler teaches the canonical form, then flip to the fix.

Module calls are qualified

Imported names are never injected into your namespace — a cross-module call always states its origin, and the error spells the exact form.

broken.pt
import mathx
print("{double(21)}")
The compiler answers
error: 'double' lives in module 'mathx' — module functions are called qualified: mathx.double(...) (line 2, column 9)