Skip to content
Chris Michael edited this page Jun 5, 2026 · 71 revisions

Meris

Meris

Meris is a small typed scripting language and compiler. The current implementation includes a lexer, parser, formatter, name resolver, type checker, interpreter, CLI, and a growing JVM backend.

This wiki documents what exists in the codebase today. Planned work is marked as planned. If a feature is parsed but not executable, the page says so.

Reference

Page What it covers
Reference Index Definitions, signatures, and support status.
Capability Matrix v0.2 feature status grouped by frontend, type system, runtime, JVM, interop, CLI, Server, and release readiness.
Implementation Roadmap And Policies Current implementation policies for diagnostics, stdlib, JVM, packages, benchmarks, Server, and release gates.
API Reports Versioned public API report output and report-to-report compatibility diffs.
Language Server Protocol meris lsp, diagnostics, syntax services, formatting, semantic tokens, go-to-definition, code actions, completion, and the thin VS Code client.
Declarations And Types Packages, imports, products, variants, generics, traits, and Java static interop status.
Expressions And Control Flow Calls, blocks, bindings, conditionals, match, handle, raise, and fail-fast behavior.
Language Surface Declarations, expressions, modules, and script entry points.
Language Expressiveness Baseline Multi-paradigm design baseline and architecture follow-up issues.
Declaration Visibility pub, internal, and private declaration modifiers.
Type Expressions Builtin generic type syntax and checking.
Type Aliases Transparent names for existing type expressions and implemented named raised-error sets.
Traits Checked contract metadata and current trait boundary.
Product Copy Update And Display Helpers Product update syntax and execution, plus the current debug helper boundary.
Debug Shape And Field Metadata Implemented Debug.Shape and Debug.Fields diagnostics for eligible Meris-owned values.
Function Values Implemented function-value type model, named references, captured lambdas, expected-type elided lambdas, calls, and raised-error propagation.
Dynamic Dispatch Values Explicit dyn Trait values with frontend checks, interpreter dispatch, and core JVM dispatch.
Structured Concurrency And Cancellation Runtime ownership, cleanup, and adapter cancellation contracts; source-visible async/task APIs remain design work.
Actor-Like Message Loops Design baseline for owned message loops, bounded mailboxes, and supervision before actor syntax exists.
Test Declarations test syntax and meris test runner behavior.
Test Doubles And Fixture Conventions Engineering policy for deterministic boundary tests and architecture fixtures.
Architecture Pattern Fixtures Implemented conformance fixtures for architecture and design-pattern expressiveness.
Architecture Pattern Conformance Matrix Current pattern support, blockers, and issue links for multi-paradigm architecture.
Performance Benchmarks Public benchmark scaffold, result-history schema, and real-world workload families.
Standard Library Builtin types and standard modules.
Standard Error Boundary Opaque builtin errors and recovery policy.
Db Boundary SQL-first database catalog, prepared values, row decoders, and DbError payloads.
Json Boundary Textual Json functions plus typed decode and encode for primitives, lists, options, products, generic products, and closed variants.
HTTP Boundary Text HTTP client functions, server host boundary, and meris serve.
Meris Server Package Server package roadmap, response constructors, route matcher/checker/inventory internals, and current hosting boundary.
Runnable Examples Validated non-server examples for clean architecture, command-as-data, and function-value callbacks.
Runnable Server Examples Validated Server examples for JSON APIs, body codecs, query/header extraction, and lifecycle behavior.
Server Dependency Environment Typed construction of server application dependency environments without an ambient service locator.
Package And Workspace Boundaries Workspace package graph, lockfile direction, API reports, and import boundary design.
CLI And Runtime Commands, interpreter execution, and script validation.
JVM Backend What meris compile emits today.
Match Expressions Value-level variant matching and field bindings.
Structural Equality Equality rules for primitives, Unit, Option, List, products, and variants.
Java Interop Compile-only Java static calls, constructors, and borrowed instance methods.
Java Collection Adapters Copy boundary policy for Java collections.
License Repository license and user-code boundary.

Current Boundary

The interpreter is the broadest execution path. The JVM backend is deliberately smaller, but it now covers script entry points, pure expressions, product constructors, variant constructors, product field access, typed failure recovery, value-level match, and the implemented standard-library bridges. It also supports a narrow compile-only Java interop boundary for static Java methods, opaque Java handles, public constructors, and borrowed instance methods with explicit nullability and declared Java exception translation to typed-error variants.

Test declarations are executable through meris test. They are checked as zero-argument Unit bodies and can run through the interpreter or the compiled JVM test runner. The JVM runner separates recoverable Meris typed failures from internal host panics.

Type aliases are frontend metadata. The parser, formatter, name resolver, and type checker understand them; the interpreter and JVM backend see the expanded target type.

Raised-error set aliases are frontend metadata too. They name checked raises sets for signatures, function values, lambdas, traits, and tests. The checker expands them before raise/handle comparison; tooling displays the alias spelling plus the expanded concrete error set.

Traits are also frontend metadata in the current implementation. Trait method signatures and impl Trait for Type conformances are checked, with Self substituted by the implemented type. Explicit Trait.Method(Value, ...) calls and instance-sugar Value.Method(...) calls dispatch through the checked conformance table in the interpreter and JVM. Overlapping visible conformances are rejected before dispatch can depend on declaration order. Dynamic dispatch values now have parser, formatter, type-checker, object-safety, construction conformance checks, interpreter dispatch, and core JVM method dispatch for dyn Trait. Function values, named function references, non-capturing lambdas, captured lambdas, expected-type elided lambdas, function-value calls, and higher-order List transformations are implemented in the interpreter and JVM. Recursive lambdas remain future work.

class and config are not reserved. Meris does not currently define class or source-level config declarations. Project configuration belongs in meris.toml; runtime configuration belongs behind explicit standard-library calls such as Env.Get and Env.Require.

Java collection support uses explicit List copy Element adapters into Meris-owned immutable list snapshots. Nullable collection returns use Option<List<Element>>. Nullable elements use explicit List copy Option<Element> adapters. Nested list elements are copied recursively when their leaves are supported scalar or explicit optional scalar values.

match is executable in the interpreter and JVM backend for ordinary typed variant values. It remains separate from typed runtime failures; use handle for recovery from raise.

Clone this wiki locally