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.
Unit variants without parens
Status.Active is a value, not a call. One spelling per construct — the error shows it verbatim.
enum Status:
Active
let s = Status.Active()The compiler answers
error: 'Status.Active' is a unit variant — write it without parentheses: Status.Active (line 3, column 9)enum Status:
Active
let s = Status.Active
print("{s}")Fixed — and it runs
Status.Active