DEVELOPMENT EDITION · 769442725406
Examples

Vibe reference examples

core is a complete application using the ordinary Vibe forms; it prints expected.stdout. Each project under programs shows one rule of the Vibe reference, and each under rejections shows the diagnostic for a Python form Vibe does not take:

Project Shows
programs/string-escapes Python's string escapes; an unknown escape keeps its backslash
programs/import-alias from m import f as g and import m as n
programs/true-division / gives a float; // and % floor as in Python
programs/enum-member Colour.RED, also through an import, and Colour.first/last
programs/reverse-zip zip with one reversed source pairs as Python does
programs/dataclass-default A dataclass field default fills an omitted keyword
programs/exception-message An exception occurrence's message, through ada.exceptions
programs/foreign-output A Vada procedure's final out parameter as a Vibe result
rejections/unknown-decorator A decorator Vibe does not know (B0401)
rejections/parameter-markers / and * in a parameter list (B0401)
rejections/import-binds-named from m import f binds f alone (B1001 for another name)
rejections/enum-bare-member A bare member name, RED (B1001)
rejections/named-escape \N{...} (B0602)
rejections/negative-index A negative index (B0401)
rejections/zip-two-reversed Two reversed sources in one zip (B0401)
rejections/owner-not-null None assigned to an Owned[T] (B4109)

cases.json records each project's expected output or diagnostic. Run them all from the repository root with a built compiler:

python3 docs/manuals/examples/syntax-reference/vibe/validate.py --compiler /absolute/path/to/veradic

--corpora also copies every test/corpus-vibe-* project and checks, proves and runs it, comparing its output. Everything is built in temporary directories. --record PATH writes a detailed machine-readable record.