Vector Labs

Arra

Arra is a statically typed, left-to-right array-functional language built around type-directed syntactic hooks. Its implemented Essential kernel combines structural function valence, shape-visible arrays, extensible records, non-resumable effects, compile-time theories and models, and a source-defined standard library.

Specification

Essential Arra, Surface Syntax, and Core IR are normative. Overview is the short introduction.

General kind computation, solver-backed shape equations and refinements, resumable effects, recursive constrained definitions, effectful or resource-owning streams, and optimizing backends remain compatible future work rather than gaps in the Essential contract.

Reference pipeline

source modules
  → Unicode/ASCII lexer and layout normalization
  → indexed and resolved surface declarations
  → elaborated inference IR with resolved hook/model evidence
  → immutable monomorphic Typed IR
  → structural Core lowering
  → independent Core checking
  → deterministic treewalk execution

The OCaml reference implementation exercises the complete pipeline. It includes:

Command line

arra run FILE [ENTRY] [-- ARG...]
arra check FILE
arra core FILE [ENTRY]
arra --diagnostic-format=text|json ...

run defaults to the answer entry. Successful checks and Core output use standard output; diagnostics use standard error. Exit statuses 0, 1, and 2 mean success, diagnosed program failure, and invalid invocation respectively.

Standard library

Prelude.arra is a forwarding facade over independently importable source modules:

The driver loads the installed graph rooted at Prelude.arra, grants primitive access only to that graph, and implicitly opens only the facade for user code. Set ARRA_STDLIB to override the installed standard-library directory.

Documentation

Read in this order:

  1. Overview — language shape and boundaries.
  2. Surface Syntax — normative lexical and grammar contract.
  3. Essential Arra — normative source semantics.
  4. Core IR — normative lowering, checking, and execution boundary.