effekt-lang/effekt
53.6
Adequate · 6 November 2026
32.4k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Features
Add Chez Scheme backend examples for feature flags and libraries
New example files have been added to the Chez Scheme backend location to demonstrate specific language features. The \feature-flags-ffi.effekt\ file illustrates how to define external functions that return different values based on the target backend (js, chez, llvm, or default), with a corresponding check file verifying the output. Additionally, \libraries.effekt\ provides a compilation test for various standard library modules (such as dequeues, immutable lists, arrays, dictionaries, regex, and strings) to ensure they integrate correctly with the Chez backend.
examples/chez · high confidence
Add Chez Scheme backend primitives and portable regex library
The Chez Scheme backend now includes a new \effekt\_primitives.ss\ file that implements core runtime support, including structural equality for records and lists, generic value printing (show), and handling of holes and unreachable code paths. Additionally, a portable regular expression library (\pregexp.scm\) has been added to support text processing capabilities within the backend.
libraries/chez/common · high confidence
Add Chez Scheme monadic backend with delimited control and state support
Introduces a new Chez Scheme code generation backend for the monadic variant of the language. This implementation provides the runtime infrastructure for delimited control operators (reset/shift) and a state effect, enabling users to write programs using these features in Chez Scheme. The backend includes the necessary control flow primitives (trampoline, underflow) and state management (arena, fresh, backup/restore) to support these effects.
libraries/chez/monadic · high confidence
Add DOM manipulation and browser API bindings
Introduces the \web/dom\ module, providing extern definitions for interacting with the browser's Document Object Model (DOM) and Web APIs. Users can now access elements by ID, create and manipulate nodes (including setting attributes and inner HTML), handle click events, and utilize browser-specific features like \requestIdleCallback\. The module also includes a helper function to clear node contents.
libraries/js/web · high confidence
Add char library examples for ASCII character classification
The examples/stdlib/char directory now includes demonstration programs and expected outputs for the new char library. These examples cover ASCII character classification functions including isAlphabetic, isAlphanumeric, isDigit, isLower, isUpper, isWhitespace, and isASCII, as well as a char\_default example demonstrating effect handling for character operations.
examples/stdlib/char · high confidence
Add delimited control operators (reset/shift) and state management for Chez Scheme
New Scheme source files are added to the \libraries/chez/callcc\ directory to provide implementations of delimited control operators (\reset\, \shift\) and mutable state (\state\) for the Chez Scheme backend. The changes introduce a datatype system (\datatype.ss\) for defining algebraic data types, sequence and stack management logic (\seq.ss\, \seq0.ss\) to handle continuation prompts and arenas, and tail-recursive operator implementations (\tail.ss\, \tail0.ss\) that manage the control stack and state restoration.
libraries/chez/callcc · high confidence
Add effect-handlers benchmark suite
The \examples/benchmarks/effect\_handlers\_bench\ directory now contains a comprehensive suite of benchmarks for the Effekt language, including \countdown\, \generator\, \handler\_sieve\, \iterator\, \nqueens\, \parsing\_dollars\, \product\_early\, \resume\_nontail\, \tree\_explore\, and \triples\. These benchmarks exercise various effect-handling patterns such as state management, tree traversal, search with backtracking, and non-tail recursive resumption, providing a standardized way to measure compiler performance and correctness for effect handlers.
_examples/benchmarks/are\_we\_fast\_yet, examples/benchmarks/duality\_of\_compilation, examples/benchmarks/effect\_handlers\bench · high confidence
Add examples for higher-order function composition and control effects
New example files demonstrate the use of higher-order function composition via a \Compose\ interface and control flow effects via a \Control\ interface, including handlers and implementations for these capabilities.
examples/pos/object · high confidence
Add filesystem I/O examples
Added example programs in the \examples/stdlib/io/filesystem\ directory demonstrating synchronous and asynchronous file reading, writing, and appending, as well as a word-count utility.
examples/stdlib/io/filesystem · high confidence
Add immutable ordered finite map and set to the standard library
The standard library now includes immutable, ordered finite collections for maps and sets. Users can create maps using \map::fromList\ and \map::collect\, and perform operations such as \put\, \delete\, \get\, \filter\, and \union\/\intersection\ with custom combine strategies. Similarly, sets support \insert\, \contains\, \difference\, \union\, and \intersection\. These collections are ordered by a provided comparison function (e.g., \box compareInt\ or \box compareStringBytes\) and are demonstrated through examples like word counting, cache management with expiration, and set operations on text data.
examples/stdlib/map · high confidence
Add initial VM backend for core IR output
A new VM backend has been added to the compiler pipeline, which outputs the aggregated core module as an intermediate representation (IR). This component, located in the VM generator, processes source code through core, middle-end, aggregation, dead-code elimination, and optimization phases, ultimately producing a structured core module output. This IR is utilized by the interpreter and other tools that require access to the optimized core representation of Effekt programs. Also in this area: 1 commit (0 fixes) modifying effekt/shared, examples, repository.
effekt/shared/src/main/scala/effekt/generator/vm · medium confidence · unverified
Add mutable dictionary library for Chez Scheme backend
A new \mutable/dict\ module has been added to the common libraries, providing a mutable dictionary implementation backed by Chez Scheme hash tables. This library exposes operations for creating empty dictionaries (including weak hash tables), inserting, retrieving, checking for key existence, and removing entries, enabling users to utilize mutable key-value stores when targeting the Chez Scheme backend.
libraries/chez/common/mutable · high confidence
Add name-based implicit parameter examples
The \examples/pos/name-based-implicits\ directory now includes a suite of demonstration programs (e.g., \boxed\, \comparer\, \display\, \implicit-interfaces\, \typelevel\) that showcase the language's support for name-based implicits. These examples cover various use cases such as recursive implicit resolution, qualified implicit lookups, default values, and type-level computations, verifying that the feature functions correctly across these scenarios.
examples/pos/name-based-implicits · high confidence
Add new benchmarks for lambda calculus NbE, binary search, checkpointing, and unification
The examples/benchmarks/other directory now includes several new benchmark suites to exercise language features and performance characteristics. These include a Normalization by Evaluation (NbE) implementation for the untyped lambda calculus, an effectful binary search algorithm, a checkpointing/retry pattern, a generator using regions, a tracking map benchmark adapted from Advent of Code, a Robinson-style type unification algorithm (with both map and dictionary variants), a word frequency counter using dictionaries, and benchmarks for Church exponentiation, variadic combinators, and Knuth's 'man or boy' test. Each benchmark is accompanied by a corresponding .check file defining the expected output.
examples/benchmarks/other · high confidence
Add streaming network example with TCP client and server
A new streaming example has been added to the standard library network examples, demonstrating how to establish a TCP connection between a client and a server. The example uses the \streaming\ capability to send and receive data, specifically showing how to emit a request string and read a response. It also includes a check file to verify the output.
examples/stdlib/network · high confidence
Added CPS pretty-printer for debugging and inspection
A new PrettyPrinter component has been added to the CPS module, enabling the conversion of CPS intermediate representation structures (such as modules, definitions, statements, expressions, and handlers) into human-readable source-like text. This tool supports the visualization of control-flow constructs like jumps, resets, shifts, and resumptions, as well as value bindings and region management, facilitating easier debugging and inspection of the compiler's internal state.
effekt/shared/src/main/scala/effekt/cps · high confidence
Added Chez Scheme immutable list implementation
The library now includes a new \immutable/cslist\ module that provides an immutable list type backed by Chez Scheme's native cons-list structure. This addition exposes core list operations such as \cons\, \nil\, \isEmpty\, \head\, and \tail\ via extern definitions, along with conversion functions to and from the standard Effekt \List\ type (\toChez\ and \fromChez\) and a utility to convert to an array.
libraries/chez/common/immutable · high confidence
Added capture analysis examples for embedded systems and resource management
The examples/pos/capture directory now includes new demonstration files illustrating the language's capture and resource tracking capabilities. Specifically, mbed.effekt models an embedded systems scenario with interrupt service routines and non-blocking timers, while resources.effekt demonstrates handling external resources like stack-allocated arrays. Additional examples (borrows, defdef, forcing, regions, selfregion, state\_eff) cover advanced features such as boxed captures, region-scoped state, effect lifting, and direct-style transformation of builtins.
examples/pos/capture · high confidence
Added example demonstrating exception handling combinators
The examples/stdlib/exception directory now includes a new example file (combinators.effekt) and its corresponding check file (combinators.check). This example demonstrates how to use exception handling combinators such as default, ignore, report, and finalize, as well as how to reify exceptions into Result types. Users can now refer to this example to understand the syntax and behavior of these exception handling patterns.
examples/stdlib/exception · high confidence
Added example files for the show binding
New example files were added to the stdlib/show directory to demonstrate the show binding. These include data.effekt and data.check for custom data types, if\_cond.effekt and if\_cond.check for conditional logic with show, and primitives.effekt and primitives.check for primitive types like integers, floats, hex values, and characters.
examples/stdlib/show · high confidence
Added examples for polymorphic effect aliases and exceptions
New example files have been added to the \examples/pos/polymorphic\ directory to demonstrate specific language features. The \aliases.effekt\ file shows how to define polymorphic effect aliases (combining multiple interfaces into a single effect signature) and handle them. The \exceptions.effekt\ file demonstrates a generic exception handling pattern using polymorphic effects, where an exception type is passed as a type parameter to a reporting function.
examples/pos/polymorphic · high confidence
Added machine analysis and pretty-printing utilities
The machine module now includes an Analysis component that computes free variables for machine statements (handling constructs like jumps, switches, variable operations, and continuations) and a PrettyPrinter that formats machine definitions and statements into a readable textual representation, supporting all current statement types including literals, foreign calls, and holes.
effekt/shared/src/main/scala/effekt/machine · high confidence
Added mutable dictionary examples
Added example files demonstrating the usage of the mutable dictionary API, specifically showing how to insert key-value pairs and look them up, as well as how to iterate over tagged entries.
examples/stdlib/dictionary · high confidence
Added random array shuffling and element picking examples
The examples/stdlib/random directory now includes demonstration files for the \random::shuffle\ and \random::pick\ functions. Users can refer to \shuffle.effekt\ and \shuffle.check\ to see how to randomly reorder arrays, and \pick.effekt\ and \pick.check\ to see how to select random elements from an array, using the \minstd\ random number generator.
examples/stdlib/random · high confidence
Expand stream module with new combinators and examples
The stream module in the standard library has been expanded with new combinators and usage examples. Users can now use \all\ and \any\ to check if all or any elements in a stream satisfy a predicate, \countIf\ to count matching elements, and \takeWhile\ to consume elements until a condition fails. New utility functions include \first\ to retrieve the initial element, \zip\ and \zipLongest\ to combine streams (with \zipLongest\ handling unequal lengths via \OneOrBoth\ variants), and \tee\ to split a stream into two parallel consumers. The module also introduces \fix\ for defining recursive stream behaviors and demonstrates advanced patterns like fast exponentiation and Taylor series approximations.
examples/stdlib/stream · high confidence
Initial LLVM backend implementation
The LLVM backend is now available, allowing users to compile Effekt programs to LLVM IR (.ll files). This new feature introduces a compilation pipeline that transforms source code through Core, Machine, and finally LLVM IR stages. The backend supports C externs via the 'c' feature flag, enables tail-call optimization using 'tailcc', and provides debug output of intermediate IR stages (Core, Machine, Target) for VSCode integration.
effekt/shared/src/main/scala/effekt/generator/llvm · high confidence
Initial project scaffolding and repository setup
This change establishes the foundational structure of the repository, introducing the MIT license, a citation file for academic referencing, and a Nix flake that configures the build environment and integrates a suite of community projects. It also adds a .gitmodules file to track the Kiama parser library as a submodule, sets JVM memory options, and defines a .gitignore to exclude build artifacts and IDE files.
(repo-wide) · high confidence
Introduce LLVM backend standard library implementations for byte arrays, I/O, and runtime system
The LLVM backend now includes a complete C-based standard library implementation for core data types and system interactions. This adds \bytearray.c\ to provide mutable byte array operations (creation, indexing, copying, string conversion, comparison) and \io.c\ to expose file system operations (open, read, write, close, mkdir) and console I/O (print, readln, random) via libuv. The runtime system (\rts.ll\ and \types.c\) is also defined, establishing the memory model with reference counting, erasure/sharing semantics, and stack management. These files collectively enable the LLVM backend to handle basic data manipulation and asynchronous I/O.
libraries/llvm · high confidence
Introduce instrumented virtual machine with built-in runtime support
The VM backend now includes a new instrumented virtual machine implementation that provides core runtime capabilities, including built-in support for integer and double arithmetic, comparison, and conversion operations, as well as basic printing. This change adds the foundational interpreter logic, value representations, and an instrumentation framework that allows tracking runtime metrics such as dispatches, allocations, and pattern matches, enabling performance analysis and debugging of executed programs.
effekt/shared/src/main/scala/effekt/core/vm · high confidence
Introduce mutable map backed by JavaScript Map
A new \mutable/map\ module has been added, providing a mutable map data structure implemented via the native JavaScript \Map\. This allows users to create, update, and retrieve key-value pairs with side effects, exposing operations for getting values, updating entries, and retrieving keys or values as arrays.
libraries/js/mutable · high confidence
Introduce standalone REPL and Language Server with virtual file system support
The compiler now includes a standalone Read-Eval-Print Loop (REPL) for interactive use and a Language Server Protocol (LSP) implementation for IDE integration. The REPL supports interactive commands such as \:type\ for type inspection, \:status\ for environment overview, and \:reset\ to clear state. The LSP server provides standard features like hover information, go-to-definition, and diagnostics, along with custom Effekt extensions for publishing intermediate representation (IR) and tracking type holes. To support these interactive and browser-based environments, a \VirtualModuleDB\ is introduced, allowing the compiler to resolve imports and FFI includes from a virtual file system rather than the local disk.
repository · high confidence
Introduce web-based JavaScript backend and LSP server
The JavaScript target is now split into a web-specific backend (js-web) and its associated Language Server Protocol (LSP) infrastructure. This change adds a new \Backend\ configuration for the \js-web\ target, a configurable \EffektConfig\ defining the prelude and optimization settings, and a \LanguageServer\ class designed to run in a web worker. The LSP server exposes JavaScript-exported methods for type-checking, file I/O, compilation, and code intelligence features like hover information and inferred captures, supported by a new in-memory virtual file system implementation in \PathUtils\.
effekt/js/src/main · high confidence
New Chez Scheme backends with monadic and CPS compilation strategies
The Chez Scheme backend now offers two distinct compilation strategies: a monadic approach (enabled via the 'chezMonadic' feature flag) and a continuation-passing style (CPS) approach (enabled via 'chezCPS'). The monadic backend translates Effekt code into a monadic intermediate representation using 'pure', 'then', and 'run' combinators, while the CPS backend first transforms the core AST into CPS form before generating Chez Scheme code, supporting advanced control flow features like delimited continuations (reset/shift). Both strategies share a common pretty-printing infrastructure and handle state, regions, and externs, providing users with flexible code generation options for the Chez Scheme target.
effekt/shared/src/main/scala/effekt/generator/chez · high confidence
New I/O and concurrency benchmarks added
Added a suite of new benchmarks in the \examples/benchmarks/input\_output\ directory to validate input/output and concurrency capabilities. These include \channel\_primes\ and \sender\_receiver\ for testing channel-based concurrency, \networked\_numbers\ and \server\_client\ for TCP networking, \dyck\_one\, \number\_matrix\, \word\_count\_ascii\, and \word\_count\_utf8\ for file system and stream processing, and \financial\_format\ for structured data parsing.
_examples/benchmarks/input\output · high confidence
New I/O examples for environment variables, subprocesses, promises, and time
Added example files demonstrating usage of the environment variable getter, minimal subprocess API (spawn, stdin/stdout/stderr handling), and concurrency primitives including promises, sleep, and await. These examples serve as reference implementations for the corresponding stdlib modules.
examples/stdlib/io · high confidence
New OS detection and path utility abstractions
The JVM backend now includes dedicated utilities for operating system detection and path manipulation. A new \OS\ enum distinguishes between POSIX and Windows environments based on the system property, allowing the compiler to adapt behavior to the host OS. Additionally, a \PathUtils\ object provides a wrapper around Java's \File\ class, offering convenient methods for path construction, canonicalization, and checking file existence, including support for locating resources within JARs.
effekt/jvm/src/main/scala/effekt/util · high confidence
New array examples and test cases
Added example files and corresponding check files for array operations, including copying arrays, converting between lists and arrays, and summing array elements.
examples/pos/array · high confidence
New array standard library examples
Added example programs and expected outputs for a comprehensive set of array operations, including \all\, \any\, \binarySearch\, \count\, \drop\, \equals\, \filtered\, \foldLeft\, \foldRight\, \indexOf\, \lastIndexOf\, \map\, \mapped\, \partioned\, \reverse\, \reversed\, \sliced\, \sort\, \take\, \unzipped\, \zipped\, and \zippedWith\.
examples/stdlib/array · high confidence
New benchmark runner and target-specific configuration files
The benchmarking tooling now includes a dedicated runner (runner.effekt) that executes benchmarks with a side-effect barrier to prevent compiler optimizations from dropping results, and supports multiple configuration files (config\_default.txt, config\_chez-cps.txt, config\_js.txt, config\_llvm.txt) that define specific problem sizes for various benchmark suites like 'are\_we\_fast\_yet', 'duality\_of\_compilation', 'effect\_handlers\_bench', and 'input\_output' tailored to different backends.
examples/benchmarks · high confidence
New bidirectional effect examples added
Added a suite of new example programs in the \examples/pos/bidirectional\ directory to demonstrate bidirectional effect handling capabilities. These include \effectful\_block\_op\ for nested effect handlers, \effectfulobject\ and \iterators\ for iterator patterns using effects, \higherorder\ and \higherorderobject\ for higher-order effect operations, \pingpong\ for mutual recursion between effects, \res\_obj\_boxed\ for boxed effect operations, \scheduler\ for a basic concurrency scheduler, and \selfrecursion\ which documents a current limitation regarding recursive effect mentions. The \typeparametric\ example was also updated to reflect changes in extern interface definitions.
examples/pos/bidirectional · high confidence
New bytearray comparison and sorting examples
Added example programs demonstrating the new \compareByteArray\ method for lexicographical comparison of byte arrays and the \sort\ function for in-place sorting. The \bytearray\_compare.effekt\ file shows how to compare empty, zero-filled, and string-derived byte arrays, while \bytearray\_sort.effekt\ provides a test suite validating the sorting behavior on empty, single-element, already sorted, reverse sorted, and large byte arrays.
examples/stdlib/bytearray · high confidence
New case studies for Effekt language effects and handlers
The \examples/casestudies\ directory now includes a comprehensive set of documentation and executable examples demonstrating the use of effects and handlers in the Effekt language. This addition introduces case studies covering a pull-based lexer, a backtracking parser, a pretty printer, an ANF transformation, automatic differentiation, probabilistic inference, build systems, and naturalistic DSLs. Each study is provided as a literate code file (\.effekt.md\) with corresponding check files (\.check\) to verify output, and an overview \README.md\ guides users through the recommended learning order and independent topics.
examples/casestudies · high confidence
New common standard library modules for arrays, byte arrays, and dictionaries
The \libraries/common\ area now includes a comprehensive set of new standard library modules, introducing mutable \Array\ and \ByteArray\ types with backend-specific implementations for JavaScript, Chez Scheme, and LLVM. It adds a mutable trie-based \Dictionary\ for efficient key-value storage, a \Buffer\ interface for ring buffers, and a \Dequeue\ implementation. Additionally, new modules provide benchmarking utilities (\bench\), character handling (\char\), control flow helpers (\control\), and exception management (\exception\), establishing a shared foundation for the language's core data structures and runtime primitives.
libraries/common · high confidence
New compiler utility infrastructure and tooling
This change introduces a suite of new utility modules in the compiler's shared codebase to support enhanced developer experience and internal architecture. It adds ANSI and HTML syntax highlighting for console and web output, a colored messaging system for improved error reporting, and a documentation generator for exporting compiler metadata. Additionally, it provides a structural macro system for automatic tree traversal, a caching mechanism for build tasks, a trampoline for safe recursion, and utilities for timing, debugging, and handling markdown sources.
effekt/shared/src/main/scala/effekt/util · high confidence
New core compiler phases and infrastructure
The core compiler pipeline now includes dedicated phases for dead code elimination and name renaming, alongside a rewritten transformer and pretty-printer. The new DeadCodeElimination phase removes unreachable code from the core representation, while the Renamer and TestRenamer components handle variable freshening and alpha-equivalence checks for debugging and testing. The Transformer has been updated to produce the new core tree structure, and the PrettyPrinter has been enhanced to support detailed and internal ID printing for better visibility into the core representation.
effekt/shared/src/main/scala/effekt/core · high confidence
New scanner examples for reading doubles and separating values
Added example files in the scanner module demonstrating how to read double-precision floating-point numbers (including scientific notation) and how to separate and parse comma-delimited integer values using the scanner's peeking and list capabilities.
examples/stdlib/scanner · high confidence
New standard library IO modules for channels, console, environment, errors, filesystem, network, promises, signals, and time
The \libraries/common/io\ directory now provides a comprehensive set of new modules for standard IO operations. Users can now use rendezvous channels (\io/channel\) for synchronous communication, interact with the console via \io/console\, and access environment variables through \io/env\. Error handling is standardized with \io/error\, which maps libuv error codes to stable \IOError\ types. Filesystem operations (\io/filesystem\) support reading, writing, and appending files with chunked I/O and streaming interfaces. Network capabilities include TCP connections and listeners (\io/network\) with streaming support. Concurrency primitives are introduced via \io/signal\ for rendezvous signaling, \io/promise\ for asynchronous task results, and \io/time\ for sleeping. These modules are implemented across jsNode, Chez, and LLVM backends, providing a unified API for platform-specific IO.
libraries/common/io · high confidence
New string utility functions and comparison operators
The standard library now includes \padLeft\ and \padRight\ for string padding, \utf8ByteLength\ to retrieve the byte count of a string, and a full set of comparison operators (\\<\, \\<=\, \\>\, \\>=\) for strings. These additions are demonstrated through new example files covering basic comparisons, general string operations (such as \charAt\, \indexOf\, \split\, \join\, \toInt\, \endsWith\, and \lastIndexOf\), and Unicode handling across different platforms.
examples/stdlib/string · high confidence
Project build infrastructure and versioning setup
The project's build configuration has been established with sbt version 1.11.7 and Scala.js 1.22.0. A new centralized version file (EffektVersion.scala) defines the current version as 0.82.0. New sbt plugins include sbt-assembly (2.4.1) for JAR packaging, sbt-scalafmt (2.6.1) and sbt-scalafix (0.14.7) for code formatting and linting, and sbt-updates (0.7.0) for dependency management. Additionally, new build tasks have been introduced: a documentation generator (TreeDocs) that updates inline comments in source files, and a benchmarking framework (benchmarks.scala) that collects, builds, and runs benchmarks using hyperfine, exporting results to CSV.
project · high confidence
Standard library examples and test harnesses added
The \examples/stdlib\ directory now includes executable example files and corresponding check files for several standard library modules, including \acme\, \buffer\, \bytestream\, \json\, \queue\, \random\, and \stringbuffer\. These additions provide concrete usage examples and automated verification outputs for the standard library components.
examples/stdlib · high confidence
Support for nested namespaces and qualified name resolution
The namer now supports defining nested namespaces and resolving names using fully qualified paths (e.g., \outer::inner::Constructor\). Users can define types, records, and functions within nested namespace structures, and access them via explicit qualification. This change also introduces syntax sugar for namespace declarations and distinguishes between top-level definitions and those within namespaces, enabling more complex module organization.
examples/pos/namer · high confidence
Removals
Removal of JavaScript runtime and compiler infrastructure
The JavaScript standard library files (stdlib.js, stdlib-prompt.js, stdlib-trampoline.js, and effekt.js) and the log4j configuration have been removed, eliminating the runtime support for executing Effekt programs in JavaScript. Additionally, the core Scala compiler components—Driver, Evaluator, Namer, Parser, Typer, Unifier, and the JavaScript code generator—have been deleted, removing the ability to parse, type-check, and compile Effekt source code.
src/main · high confidence
Removal of legacy JavaScript runtime and standard library files
The \lib\ directory no longer includes the core JavaScript runtime (\effekt\_runtime.js\), built-in utility functions (\effekt\_builtins.js\), the main module definition (\effekt.effekt\), or the file I/O implementation (\io/file.effekt\ and \io/file\_include.js\). These files, which previously provided the execution engine, basic data operations, and file system access for the language, have been deleted, indicating a shift in how the runtime or standard library is structured or delivered.
lib · high confidence
Architecture
Refactor compiler pipeline into explicit, composable phases
The compiler's internal architecture has been restructured to use a formal \Phase\ trait, replacing the previous implicit or ad-hoc pipeline execution. This change introduces explicit phase boundaries (such as the new \Namer\ phase) and a \PrecedenceTable\ for operator parsing, making the compilation steps more modular, testable, and easier to extend. Users benefit from a more robust compiler foundation that supports better caching, clearer error reporting per phase, and improved maintainability of the language implementation.
effekt/shared/src/main/scala/effekt · high confidence
Refactored compiler context into modular traits
The compiler's internal state management has been restructured to improve modularity and maintainability. The previous monolithic context structure has been split into distinct, composable traits: \ContextOps\ (handling scoping and error reporting), \ModuleDB\ (managing source resolution and module loading), and \Assertions\ (providing safe type-casting extensions for symbols). This change centralizes error handling logic and clarifies the separation of concerns between configuration, symbol databases, and type assertions within the compiler's context layer.
effekt/shared/src/main/scala/effekt/context · high confidence
Behavioural changes
4 commits (0 fixes) modifying examples
A change to existing behaviour in examples — 4 commits, 53 files: “Add Euclidean-based \div\ and \mod\ (\#1271)”; “Add benchmark args (\#1142)”; “Benchmark Advent of Code 2025 (\#1489)”; and 1 more (refs \#1271, \#1142, \#1489, \#1495). Also in this area: Added example implementations for heap and union-find data structures.
_examples/benchmarks/advent\_of\_code\_2025, examples/benchmarks/folklore\_to\fact, examples/stdlib/heap · medium confidence · unverified
4 commits (0 fixes) modifying examples/core
A change to existing behaviour in examples/core — 4 commits, 71 files: “Multi-arity Returns (\#1481)”; “Add type-directed arity raising on core (\#1483)”; “Implement Monomorphization optimization (\#1024)”; and 1 more (refs \#1481, \#1483, \#1024, \#1480).
examples/core · medium confidence · unverified
4 commits (0 fixes) modifying examples/pos/string
A change to existing behaviour in examples/pos/string — 4 commits, 6 files: “Expand standard library (\#339)”; “Feature/Experiment: Line-based raw strings (\#1452)”; “update check files”; and 1 more (refs \#339, \#1452).
examples/pos/string · medium confidence · unverified
7 commits (2 fixes) modifying libraries/chez/cps
A change to existing behaviour in libraries/chez/cps — 7 commits (2 fixs), 1 file: “Multi-arity Returns (\#1481)”; “Fix backtracked mutable state on Chez CPS (\#1329)”; “Fix crash on allocation into region after resume on Chez CPS (\#1494)”; and 4 more (refs \#1481, \#1329, \#1494, \#1331, \#1499, …).
libraries/chez/cps · medium confidence · unverified
Enhanced pattern matching with guards, literals, and control flow integration
The pattern matching capabilities in the language have been expanded to support more expressive and flexible code structures. Users can now apply guards (conditional expressions) to match cases, allowing for complex filtering logic within pattern matches (e.g., \case \_ and guard() =\> ...\). Literal matching is now supported for integers, booleans, and unit types, enabling direct comparison against constant values. Additionally, pattern matching is integrated into \if\ and \while\ control flow statements, allowing users to destructure values directly in conditional checks (e.g., \if (curr is Some(i))\). The system also provides warnings for unreachable cases, helping users identify redundant or dead code in their match expressions.
examples/pos/patternmatching · high confidence
Improved error messages for ambiguous effect operations
When calling an effect operation that shares a name with a function or is ambiguous across multiple interfaces, the compiler now provides specific informational messages indicating which interface defines the operation and suggesting the correct \do\ syntax, rather than only reporting a generic 'Cannot find a function' error.
examples/neg/namer/issue950 · high confidence
Improved error messages for type and effect mismatches
The namer now provides clearer, recoverable error messages when function types are used incorrectly in block or value contexts. Specifically, if a second-class function is passed where a value is expected (e.g., in a record field or parenthesized parameter), the error suggests using a first-class boxed type. Conversely, if a boxed type is passed where a block is expected, it suggests removing the effect annotation or using parentheses. It also clarifies the correct syntax for multiple effect sets, recommending \/ {raise, log}\ over \/ raise / log\, and fixes the order of effect annotations for boxed types.
examples/neg/namer/types · high confidence
Improved parser error messages and whitespace warnings
The parser now provides more precise error locations and clearer messages for common syntax issues, such as missing terminators, invalid identifiers, and malformed extern declarations. It also warns when whitespace is missing around binary operators (e.g., \1+2\), helping users avoid potential parsing ambiguities. Additionally, the parser has been made more resilient, allowing it to recover from errors and report multiple issues in a single pass rather than failing immediately.
examples/neg/parsing · high confidence
Improved type error messages and concrete effect handling
The type checker now provides clearer error messages when effects are not fully known, requiring them to be concrete and dealiased for comparison. It also improves diagnostics for unbox inference errors, using an 'expected X, got Y' scheme, and enhances context for calling values as functions. Additionally, the system now supports UFCS on non-literal block receivers and implements namespaced constructors and operations.
effekt/shared/src/main/scala/effekt/typer · high confidence
Improved type-checking error messages and new negative test cases
The type checker now provides clearer, more actionable error messages for common mistakes, such as suggesting the correct syntax when a user passes a tuple instead of separate arguments (or vice versa) or when using \case\ patterns incorrectly in block literals. New negative test cases have been added to verify these improved diagnostics, covering scenarios like ambiguous block literal parameters, effect inference in while loops, and invalid uses of \resume\ inside object literals.
examples/neg/typer · high confidence
Module loading now supports .effekt.md files
The JVM context's module database has been updated to recognize and load modules with the .effekt.md extension, in addition to the existing .effekt extension. When resolving imports, the system now checks for files ending in .effekt.md and treats them as Markdown sources, allowing users to write modules using this new file format.
effekt/jvm/src/main/scala/effekt/context · high confidence
Namer enforces stricter scoping and naming rules
The namer now rejects namespace and datatype declarations that are nested inside functions, requiring them to be at the module or namespace top-level. It also prevents defining types with duplicate names and warns when type parameters shadow existing names. Additionally, local interfaces are no longer resolvable within the same scope where they are defined, and pattern matching on non-constructor identifiers like Nil is now an error.
examples/neg/namer · high confidence
Namer validates effect type argument counts
The namer now checks that effects are used with the correct number of type arguments. Users will see errors if they provide too few or too many type arguments for an effect interface, such as using \Eff\ without arguments when it expects one, or providing multiple arguments like \Eff\[Int, String\]\ when only one is defined.
examples/neg/namer/issue281 · high confidence
New CPS-based JavaScript backend with CommonJS and virtual module support
The JavaScript code generator has been replaced with a new CPS (Continuation-Passing Style) backend that transforms the core IR into CPS before generating JavaScript. This backend supports two output modes: CommonJS modules for Node.js environments and virtual modules for web/website contexts, controlled by feature flags. The new implementation includes a dedicated pretty printer, a transformer that handles class generation for data types (including reflection and equality methods), and logic for analyzing dependencies to support separate compilation. It also introduces name sanitization to handle JavaScript reserved words and special characters.
effekt/shared/src/main/scala/effekt/generator/js · high confidence
New JS runtime and standard library builtins
The JavaScript backend now includes a dedicated runtime (\effekt\_runtime.js\) and standard library (\effekt\_builtins.js\). The runtime introduces a new state management model using \Arena\ and \Ref\ classes with generation-based tracking to support local backtrackable mutable state and delimited continuations (shift/reset). The standard library provides implementations for generic \show\, \equals\, and \compare\ functions, as well as I/O utilities like \println\ and \print\.
libraries/js · high confidence
Refactor symbol identity and add dedicated printers for declarations, signatures, and types
Symbol equality and hashing now rely on strict, unique integer IDs rather than lazy name-based strings, ensuring consistent identity across compiler phases. To support clearer diagnostics and debugging, three new printer components have been added: DeclPrinter for full declaration syntax, SignaturePrinter for interface and operation signatures, and TypePrinter for type representations. Additionally, the builtins module has been updated to reflect recent language changes, including renaming Boolean to Bool, introducing Byte as a builtin type, and defining core capabilities like IO, Async, and Global.
effekt/shared/src/main/scala/effekt/symbols · high confidence
Refactored compiler architecture with explicit Backend interface and configurable prelude
The JVM compiler has been restructured to use an explicit Backend interface that pairs a compiler implementation with a runner, allowing for clearer separation of compilation and execution logic. This change introduces configurable preludes via the \--prelude\ command-line option, enabling backends to specify their own standard library modules. Additionally, the JavaScript Node backend now generates a \package.json\ file to ensure CommonJS module resolution, and the driver now supports outputting timing information in JSON or plain text formats via the \--time\ flag. Also in this area: 2 commits (0 fixes) modifying effekt/jvm.
effekt/jvm/src/main/scala/effekt · medium confidence · unverified
Refined capture annotation and explicit capability passing in the source pipeline
The source processing pipeline now includes dedicated phases to accurately track and transform capability usage. AnnotateCaptures computes and annotates the capture set for every subexpression, resetting internal state to prevent pollution across multiple analysis passes, which improves the accuracy of LSP hints and error reporting. ExplicitCapabilities transforms the source tree into explicit capability-passing style by introducing block parameters for capabilities and converting effect calls (Do nodes) into method calls on the inferred capability receiver. Additionally, ResolveExternDefs now handles extern definitions by selecting the appropriate backend-specific implementation based on feature flags and generating warnings for unflagged externs, while Spans provides utilities for querying source nodes by position to support IDE features.
effekt/shared/src/main/scala/effekt/source · high confidence
Replaced the core optimizer with a new multi-pass pipeline
The core optimizer has been completely rewritten as a new phase in \effekt/core/optimizer/Optimizer.scala\. This new pipeline introduces several distinct optimization passes: \BindSubexpressions\ establishes a normal form by explicitly naming subexpressions and removing aliasing; \Deadcode\ performs reachability analysis to remove unused definitions, constructors, and operations; \Normalizer\ inlines pure function calls and simplifies expressions based on known facts; \StaticResumptions\ optimizes tail resumptions; and \DirectStyle\ converts local continuations to direct style where possible. The optimizer runs these passes in a specific sequence (Deadcode -\> StaticArguments -\> Normalize x3 -\> Deadcode) to progressively simplify the core AST before code generation.
effekt/shared/src/main/scala/effekt/core/optimizer · high confidence
ResizableArray now enforces bounds checking on element access
The ResizableArray example now includes explicit out-of-bounds checks when accessing elements. Attempting to read an index outside the valid range (e.g., negative indices or indices greater than or equal to the current size) will trigger an OutOfBounds exception, ensuring safer array usage patterns.
_examples/stdlib/resizable\array · high confidence
Support for importing external resources
Users can now import and use external resources defined in other modules. This change introduces a new example demonstrating how to import an external resource interface and resource declaration, allowing external functions to be annotated with specific resource requirements (e.g., \at { r }\) and resolved using default implementations.
examples/pos/imports · high confidence
Test coverage
Add WebTests for JS backend integration; Add negative test cases for object implementation validation; Add regression tests for issue \#603; Added lambda-lifting examples for nested effects and pattern matching; Added negative test cases for interface type-parameter handling; Added negative test cases for lambda capture and escape errors; Added negative test cases for name-based implicits; Added test coverage for stdlib test utilities; Added type inference examples for the Effekt language; Expanded LLVM backend test coverage for language features; Expanded negative test coverage for type checking and error reporting; Expanded positive test suite for Effekt examples; New lambda and closure examples added to the language suite; New list examples and tests for standard library functions; New test infrastructure and suites for the core compiler; New test infrastructure for backends, compiler internals, and language server; Removed legacy JUnit-based parser and regression tests.
Dependencies
Update build configuration and dependencies for version 0.82.0
The project has been updated to version 0.82.0, migrating the Scala compiler to version 3.9.0 and upgrading key dependencies including LSP4J to 1.0.0, Scallop to 6.0.0, and Gson to 2.8.9. The build system now includes a Maven POM file specifically for aggregating dependency licenses and a new \package.json\ for the npm distribution, while the SBT configuration introduces tasks for assembling binaries, generating documentation, and managing local installations.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 55 → 54 (-1.8)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 59 → 59 (-0.2)
- Architecture 90 → 89 (-0.9)
- Maturity 50 → 48 (-1.6)
- Readiness 53 → 52 (-0.6)
- Security 73 → 63 (-10.1)
Resolved (22)
- Duplicated block (6 lines × 2) (effekt/shared/src/main/scala/effekt/core/Tree.scala)
- Medium CVE: [GHSA redacted] (pom.xml)
- Off-boarding risk: anonymized user #1
- Orphaned file (effekt/shared/src/main/scala/effekt/util/Timer.scala)
- Outdated (compile): com.google.code.gson:gson
- Outdated (compile): com.google.errorprone:error_prone_annotations
- Outdated (compile): com.google.guava:failureaccess
- Outdated (compile): com.google.guava:guava
- Outdated (compile): com.google.j2objc:j2objc-annotations
- Outdated (compile): org.checkerframework:checker-qual
- Outdated (compile): org.codehaus.mojo:animal-sniffer-annotations
- Outdated (compile): org.eclipse.lsp4j:org.eclipse.lsp4j
- Outdated (compile): org.eclipse.lsp4j:org.eclipse.lsp4j.generator
- Outdated (compile): org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc
- Outdated (compile): org.eclipse.xtend:org.eclipse.xtend.lib
- Outdated (compile): org.eclipse.xtend:org.eclipse.xtend.lib.macro
- Outdated (compile): org.eclipse.xtext:org.eclipse.xtext.xbase.lib
- Outdated (compile): org.rogach:scallop_3
- Outdated (compile): org.scala-lang:scala-library
- Outdated (compile): org.scala-lang:scala3-library_3
- …and 2 more
New (26)
- Collector.statement (cyclomatic 24) (effekt/shared/src/main/scala/effekt/core/LambdaSets.scala)
- Deadcode.rewrite (cognitive 21) (effekt/shared/src/main/scala/effekt/core/optimizer/Deadcode.scala)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Duplicated block (5 lines × 3) (effekt/shared/src/main/scala/effekt/core/TestRenamer.scala)
- FileTooLong: core/LambdaSets.scala (effekt/shared/src/main/scala/effekt/core/LambdaSets.scala)
- High CVE: [GHSA redacted] (pom.xml)
- Hotspot: effekt/shared/src/main/scala/effekt/Parser.scala (effekt/shared/src/main/scala/effekt/Parser.scala)
- Hotspot: effekt/shared/src/main/scala/effekt/core/Transformer.scala (effekt/shared/src/main/scala/effekt/core/Transformer.scala)
- Hotspot: effekt/shared/src/main/scala/effekt/core/Tree.scala (effekt/shared/src/main/scala/effekt/core/Tree.scala)
- Hotspot: effekt/shared/src/main/scala/effekt/generator/chez/Transformer.scala (effekt/shared/src/main/scala/effekt/generator/chez/Transformer.scala)
- Hotspot: effekt/shared/src/main/scala/effekt/generator/llvm/PrettyPrinter.scala (effekt/shared/src/main/scala/effekt/generator/llvm/PrettyPrinter.scala)
- Hotspot: effekt/shared/src/main/scala/effekt/machine/PrettyPrinter.scala (effekt/shared/src/main/scala/effekt/machine/PrettyPrinter.scala)
- Hotspot: effekt/shared/src/main/scala/effekt/machine/Transformer.scala (effekt/shared/src/main/scala/effekt/machine/Transformer.scala)
- LambdaSets.assertMonomorphic (cyclomatic 16) (effekt/shared/src/main/scala/effekt/core/LambdaSets.scala)
- LambdaSets.solve (cognitive 28) (effekt/shared/src/main/scala/effekt/core/LambdaSets.scala)
- LambdaSets.solve (cyclomatic 24) (effekt/shared/src/main/scala/effekt/core/LambdaSets.scala)
- Off-boarding risk: anonymized user #1
- Raise.stmt (cognitive 17) (effekt/shared/src/main/scala/effekt/core/ArityRaising.scala)
- Raise.stmt (cyclomatic 30) (effekt/shared/src/main/scala/effekt/core/ArityRaising.scala)
- Specializer.adapter (cognitive 19) (effekt/shared/src/main/scala/effekt/core/LambdaSets.scala)
- …and 6 more
Changes since last survey
- 35 commits — 31 feature/other, 4 fixes
By area
- effekt/shared — 12 commits
- (root) — 5 commits
- examples/benchmarks — 4 commits
- examples/core — 2 commits
- examples/neg — 2 commits
- examples/pos — 2 commits
- examples/stdlib — 2 commits
- libraries/chez — 2 commits
- libraries/common — 2 commits
- effekt/jvm — 1 commit
- examples/casestudies — 1 commit
Notable commits
- fix: Fix 'unreachable' on Chez by throwing correct error (#1496)
- fix: Fix DropBindings and run it on VM (#1505)
- fix: Fix broken links on the website (#1492)
- fix: Fix crash on allocation into region after resume on Chez CPS (#1494)
- change: Add 'unreachable' to LLVM, assume switch is well-formed (#1455)
- change: Add Euclidean-based div and mod (#1271)
- change: Add Zahn's construct from Knuth as an example (#1490)
- change: Add benchmark args (#1142)
- change: Add hex int syntax (#1403)
- change: Add type-directed arity raising on core (#1483)
- change: Benchmark Advent of Code 2025 (#1489)
- change: Bump version to 0.83.0
- change: Community build: add linguistic effects (#1484)
- change: Community build: model broken packages & add new ones (#1479)
- change: Compare Bools and Strings with primitive equality on Chez (#1503)
- change: Effective Rays is not broken anymore? (#1482)
- change: Feature/Experiment: Line-based raw strings (#1452)
- change: Implement lambda set specialization (#1480)
- change: Improve code generation on Chez (#1499)
- change: LLVM: distinguish packed vs unpacked structs (#1517)
- …and 15 more
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
effekt-lang/effekt was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 55430054de394be9c660c582bd4c705fb4aeb911 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.