Examples
The repository keeps runnable examples in examples/ and non-contract teaching sketches
in examples/illustrative/.
Runnable corpus
Section titled “Runnable corpus”Use these files when you want examples that should survive the normal CLI loop:
examples/hello_tensor.ch: tensor construction and elementwise addition.examples/linreg.ch: matmul, expand, copy, and reductions.examples/vmap_relu.ch: transform-oriented tensor flow.examples/tensor_structural_ops.ch: reshape, permute, pad, and related shape helpers.examples/transformer_block.ch: larger model-style composition.
Check one example:
chelis fmt --check examples/hello_tensor.chchelis lint --check examples/hello_tensor.chchelis check examples/hello_tensor.chCheck the executable corpus:
python - <<'PY'from pathlib import Pathimport subprocess
for path in sorted(Path("examples").glob("*.ch")): subprocess.run(["chelis", "fmt", "--check", str(path)], check=True) subprocess.run(["chelis", "lint", "--check", str(path)], check=True) subprocess.run(["chelis", "check", str(path)], check=True)PYIllustrative examples
Section titled “Illustrative examples”examples/illustrative/ is for syntax and design sketches that are useful to read but
are not the Phase 0 executable corpus. Do not use those files as package acceptance
evidence unless the owning docs say a specific file is executable.
Package examples
Section titled “Package examples”For Reef package layout and shell authoring, read packages/chelis-std/reef.toml and the
source under packages/chelis-std/src/. chelis-std itself is bundled with the compiler;
use it as a runtime/package-layout reference, not something to install with Reef.