punix check¶
Type-check a PCL file or directory; print ok or a located [E#].
Synopsis¶
FILE can be:
- a single
.pclfile (composed as-is); - a directory (every
*.pclunder it composed into one program).
What it does¶
Runs the type checker only. No IR lowering, no realise, no I/O beyond reading the source. The pass is single-shot (one syntax-directed walk over the typed AST); it cannot diverge.
Output¶
Success:
Failure — every error is located with file:line:col and [E#]:
stack.pcl:5:3: error: [E1] type mismatch in 'version': expected Str, got Int
stack.pcl:12:8: error: [E2] unknown field 'pacakge' on module 'Stack'
hint: did you mean 'package'?
Exit codes:
0— clean.1— at least one located error.2— usage error (FILE missing, unreadable, not a directory).
When to use¶
Always run check before build — check is fast and catches every type error before any realise machinery runs. The CI matrix's lint step includes check over the corpus.
Examples¶
punix check hello.pcl
# ok
punix check pkgs/
# pkgs/curl.pcl:8:3: error: [E1] expected Str, got List<Str>
# pkgs/openssl.pcl:14:5: error: [E3] missing required field 'version'
Related¶
- Error codes E1–E6 — the surface
checkproduces. - Modules — how multiple files compose.