Metadata-Version: 2.4
Name: veralang
Version: 0.1.7
Summary: Vera: a programming language designed for LLMs, with full contracts, algebraic effects, and typed slot references
Author-email: Alasdair Allan <alasdair@babilim.co.uk>
License-Expression: MIT
Project-URL: Homepage, https://veralang.dev
Project-URL: Documentation, https://veralang.dev
Project-URL: Repository, https://github.com/aallan/vera
Project-URL: Issues, https://github.com/aallan/vera/issues
Project-URL: Changelog, https://github.com/aallan/vera/blob/main/CHANGELOG.md
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: lark>=1.3.1
Requires-Dist: z3-solver>=4.15.5
Requires-Dist: wasmtime>=46.0.1
Provides-Extra: lsp
Requires-Dist: pygls>=2.0; extra == "lsp"
Requires-Dist: lsprotocol>=2023.0; extra == "lsp"
Provides-Extra: dev
Requires-Dist: pytest>=9.1.1; extra == "dev"
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.6; extra == "dev"
Requires-Dist: mypy>=2.3.0; extra == "dev"
Requires-Dist: ruff<0.16,>=0.15.21; extra == "dev"
Requires-Dist: pre-commit>=4.6.0; extra == "dev"
Requires-Dist: pip-licenses>=5.5.5; extra == "dev"
Requires-Dist: veralang[lsp]; extra == "dev"
Provides-Extra: mutation
Requires-Dist: veralang[dev]; extra == "mutation"
Requires-Dist: mutmut>=3.6; extra == "mutation"
Requires-Dist: pytest-timeout>=2.4; extra == "mutation"
Requires-Dist: matplotlib>=3.7; extra == "mutation"
Dynamic: license-file

# Vera

Vera is a programming language designed for large language models to write. It
has mandatory contracts, algebraic effects, typed slot references instead of
variable names, and a compiler that emits WebAssembly.

Full documentation, examples, and the language specification are available at
[veralang.dev](https://veralang.dev) and in the
[GitHub repository](https://github.com/aallan/vera).

## Install a released version

Vera requires Python 3.11 or later. Create a virtual environment and install
the `veralang` distribution:

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install veralang
```

On Windows, activate the environment with `.venv\Scripts\activate` instead.
For editor and agent integration through the language server, install the LSP
extra:

```bash
python -m pip install "veralang[lsp]"
```

The distribution is named `veralang`, but the installed command remains
`vera`, and Python code still imports it as `import vera`. **Do not run `pip install vera`**: that name belongs to an unrelated
ERAV citizen-science project on PyPI. The wheel ships the compiler and the
`vera` command only — the bundled examples, the conformance suite, and the
specification live in the GitHub repository.

## Install from GitHub source

The source route provides the full environment — the examples, conformance
programs, and specification alongside the toolchain (the recommended setup for
agents learning the language) — and remains the route for compiler
development, unreleased changes, and testing the current `main` branch:

```bash
git clone https://github.com/aallan/vera.git
cd vera
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
```

Use `python -m pip install -e ".[lsp]"` for the language server or
`python -m pip install -e ".[dev]"` when working on the compiler.

## Try it

```vera
public fn safe_divide(@Int, @Int -> @Int)
  requires(@Int.1 != 0)
  ensures(@Int.result == @Int.0 / @Int.1)
  effects(pure)
{
  @Int.0 / @Int.1
}

public fn main(-> @Int)
  requires(true)
  ensures(@Int.result == 5)
  effects(pure)
{
  safe_divide(2, 10)
}
```

```bash
vera check program.vera
vera verify program.vera    # proves main returns 5 from safe_divide's contract
vera run program.vera       # prints 5
```

See the [CLI cookbook](https://github.com/aallan/vera/blob/main/TOOLCHAIN.md),
[language reference](https://veralang.dev/SKILL.md),
[supported-platform policy](https://github.com/aallan/vera#supported-platforms),
and [issue tracker](https://github.com/aallan/vera/issues) for more.
