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.
No hidden globals
Functions see parameters and locals, nothing else. Every dependency is in the signature — which is exactly what makes functions testable.
let limit = 10
fn over(n: Int) -> Bool = n > limitThe compiler answers
error: 'limit' is a top-level variable — functions only see their parameters and locals in POLYTONE; pass it as a parameter (line 2, column 31)fn over(n: Int, limit: Int) -> Bool = n > limit
let limit = 10
print("{over(12, limit)}")Fixed — and it runs
true