Skip to content
CAI
Software that uses CAICheck a score

effekt-lang/effekt

55.4

Adequate · 20 September 2026

29.4k

lines of production code

Scala

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Effekt is a general-purpose programming language compiler written in Scala that supports multiple backends, including JavaScript, Chez Scheme, and LLVM. It provides a full development toolchain featuring a language server for IDE integration, a REPL, and a modular compiler pipeline with optimization passes. The system includes a comprehensive standard library covering data structures, I/O, and concurrency, along with extensive benchmarking and testing infrastructure.

How it got here

2020–2022 — multi-backend compiler rewrite

42 changes.

The project underwent a comprehensive architectural overhaul, replacing the legacy JavaScript runtime with a modular, phase-based compiler pipeline supporting JVM, JavaScript, Chez Scheme, and LLVM backends. This period established the foundational infrastructure for cross-platform execution, including a virtual file system for web environments and a new Language Server Protocol implementation. Extensive test suites and standard library primitives were added to validate the new compilation strategies and ensure robust type checking and error reporting across all targets.

2023–2024 — Standard library expansion and compiler diagnostics

28 changes.

This period focused on significantly expanding the standard library with new modules for data structures, I/O, concurrency, and utilities, alongside comprehensive benchmarking suites. Concurrently, the compiler pipeline was refined to provide stricter scoping rules, explicit capability handling, and improved error reporting across parsing, naming, and type-checking phases.

2025–2026 — Core optimization and standard library expansion

24 changes.

This period focused on enhancing the compiler's core infrastructure by introducing a new optimizer pipeline for dead code elimination and normalization, alongside an instrumented virtual machine for runtime profiling. Significant effort was also directed toward expanding the standard library with new data structures like ordered maps and sets, comprehensive array operations, and various utility modules, supported by extensive example code and test coverage.

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 and standard library usage. The \feature-flags-ffi.effekt\ example illustrates how to define external functions that return different values based on the compilation backend (JS, Chez, LLVM, or default), while the \libraries.effekt\ example verifies the compilation of various standard library imports such as queues, immutable lists, arrays, dictionaries, and regex. Corresponding \.check\ files have also been added to support these examples.

examples/chez · high confidence

Add 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 introduces \CSList\ with operations for creating (\cons\, \nil\), inspecting (\isEmpty\, \head\, \tail\), and converting between Effekt lists and Chez lists (\toChez\, \fromChez\), enabling more efficient list handling in the Chez backend.

libraries/chez/common/immutable · high confidence

Add char library examples

Added example files for the new \char\ library, demonstrating usage of character classification functions such as \isAlphabetic\, \isAlphanumeric\, \isDigit\, \isLower\, \isUpper\, \isWhitespace\, and \isASCII\, as well as a \char\_default\ example handling effect failure.

examples/stdlib/char · high confidence

Add duality\_of\_compilation benchmark suite

A new set of benchmarks has been added to the \examples/benchmarks/duality\_of\_compilation\ directory to evaluate compilation performance. The suite includes eight specific test cases: \erase\_unused\, \factorial\_accumulator\, \fibonacci\_recursive\, \iterate\_increment\, \lookup\_tree\, \match\_options\, and \sum\_range\. Each benchmark is implemented in the Effekt language, imports the standard \runner\ module, and defines a \main\ function that executes the workload five times to measure performance.

_examples/benchmarks/are\_we\_fast\_yet, examples/benchmarks/duality\_of\_compilation, examples/benchmarks/effect\_handlers\bench · high confidence

Add folklore-to-fact and nofib benchmark suites

New benchmark programs have been added to the examples/benchmarks directory, including the 'folklore-to-fact' suite (covering algorithms like Ackermann, CPS-Tak, derivative calculation, and N-Queens) and the 'nofib' suite (including Boyer string matching, constraint satisfaction, and fractal generation). These additions expand the available test cases for evaluating compiler performance and correctness.

_examples/benchmarks/folklore\_to\fact, examples/benchmarks/nofib · high confidence

Add mutable dictionary library for Chez Scheme backend

A new \mutable/dict\ module has been added to the Chez Scheme backend, providing a mutable dictionary implementation backed by Chez Scheme's 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 in their programs.

libraries/chez/common/mutable · high confidence

Add random array shuffling and element picking examples

The \examples/stdlib/random\ directory now includes demonstration files for the \random::shuffle\ and \random::pick\ functions. The new \shuffle.effekt\ example shows how to randomize the order of elements in arrays, including verifying deterministic output with a fixed seed and shuffling arrays of strings. The \pick.effekt\ example demonstrates selecting random elements from an array, handling cases with multiple items, singletons, and empty arrays.

examples/stdlib/random · high confidence

Add streaming network example with TCP client/server

A new example demonstrating streaming over TCP connections has been added to the standard library network module. The example, located in \examples/stdlib/network/streaming.effekt\, shows how to set up a TCP listener on localhost:8080, accept a connection, and perform a simple request-response cycle using the \streaming\ effect with \next()\ and \emit()\ operations. It serves as a practical reference for implementing networked applications that require streaming data handling.

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 Core CPS intermediate representation structures (such as modules, definitions, statements, expressions, and continuations) into human-readable text. This tool allows users and developers to inspect the internal state of the compiler's CPS transformation, which is particularly useful for debugging issues related to control flow, continuations, and effect handlers.

effekt/shared/src/main/scala/effekt/cps · high confidence

Added example implementations for heap and union-find data structures

New example files have been added to the standard library examples directory, providing reference implementations for a mutable heap and a simple union-find data structure. These examples include the core logic and associated test suites to demonstrate usage, such as integer heap sorting and set union/find operations.

_examples/stdlib/heap, examples/stdlib/union\find · high confidence

Added examples for polymorphic effect aliases and exceptions

New example files demonstrate the use of polymorphic effect aliases (combining multiple effects into a single parameterized effect) and polymorphic exception handling, illustrating how these features work in practice.

examples/pos/polymorphic · high confidence

Added instrumented virtual machine for runtime profiling

The core virtual machine now includes an instrumentation layer that allows tracking runtime metrics. A new \Instrumentation\ trait defines hooks for events such as dispatches, pattern matches, frame pushes/pops, allocations, and continuation shifts/resumes. The \Counting\ implementation provides a simple counter-based profiler that prints statistics like static/dynamic dispatch counts, allocation numbers, and variable read/write frequencies, while \BuiltinHistogram\ tracks builtin call frequencies. This enables users and developers to analyze the performance characteristics of compiled Effekt programs.

effekt/shared/src/main/scala/effekt/core/vm · high confidence

Added machine analysis and pretty-printing utilities

The machine module now includes an Analysis component that computes free variables for machine statements, clauses, and definitions, and a PrettyPrinter that formats machine definitions and statements into a readable textual representation. These tools support debugging and inspection of the machine intermediate representation without altering runtime behavior.

effekt/shared/src/main/scala/effekt/machine · high confidence

Added monomorphization optimization examples

The examples/core directory now includes a suite of .ir files demonstrating the monomorphization optimization. These examples cover various scenarios including simple functions, boxed types, dead code elimination, higher-order blocks, and polymorphic recursion, showing how generic code is specialized for specific types.

examples/core · high confidence

ByteArray comparison and sorting capabilities

The bytearray module now supports lexicographical comparison via the \compareByteArray\ method, allowing users to determine the relative order of two byte arrays (equal, greater, or less). Additionally, an in-place sorting function \sort\ is available, which rearranges the bytes within a bytearray in ascending order using a counting sort algorithm.

examples/stdlib/bytearray · high confidence

Dictionary examples demonstrate mutable insert and lookup operations

Added example files for the dictionary standard library that demonstrate creating an empty dictionary, inserting key-value pairs, and performing lookups. The examples show that dictionary instances are mutable, allowing keys and values to be added and retrieved after creation.

examples/stdlib/dictionary · high confidence

Expanded lambda and effect examples in the Pos language

The examples/pos/lambdas directory now includes a broader set of demonstration programs illustrating the language's capabilities with first-class functions, effects, and state. New examples cover exception handling with annotated closures (annotated), effect polymorphism and capability passing (effects), generator patterns using regions and continuations (generators), higher-order functions with effectful blocks (higherorder), local mutable state captured in closures (localstate), a cooperative scheduler built with continuations (scheduler), complex closure capture and lexical scoping of effects (simpleclosure), singleton object instantiation (singletonobjects), and top-level object declarations (toplevel\_objects). These additions serve as reference implementations for users learning how to structure code using these language features.

examples/pos/lambdas · high confidence

Expanded list standard library with new combinators and examples

The list standard library has been significantly expanded with new functions and corresponding usage examples. Added capabilities include \all\ and \any\ for predicate checks, \count\ for element counting, \build\ and \fill\ for list construction, \collectSome\ for filtering options, \slow::find\ for searching, \deleteAt\, \insert\, \replace\, \modifyAt\, and \updateAt\ for index-based modifications, \drop\, \take\, and \slice\ for sub-list extraction, \splitAt\ for partitioning, \join\ for flattening, \reverseOnto\ for reversing into a target, \tails\ for suffix generation, \unzip\ for splitting pairs, and \zip\, \zipWith\, and \zipLongest\ for combining lists. These changes provide users with a more comprehensive set of tools for list manipulation and transformation.

examples/stdlib/list · high confidence

Expanded stream library with new combinators and examples

The stream module in the standard library has been expanded with new combinators and usage examples. Users can now utilize \all\ and \any\ to check conditions across streams, \countIf\ to count matching elements, and \takeWhile\ to filter elements based on a predicate. New utility functions include \first\ for retrieving the initial element, \zip\ and \zipLongest\ for combining streams (with \zipLongest\ handling unequal lengths via \OneOrBoth\ variants), and \tee\ for splitting a stream into two concurrent consumers. Additionally, a \fix\ fixpoint operator is available for recursive stream definitions, and examples demonstrate advanced patterns like fast exponentiation, Taylor series evaluation, and neighbor generation.

examples/stdlib/stream · high confidence

Immutable ordered map and set collections added to the standard library

The standard library now includes immutable, ordered \Map\ and \Set\ types, demonstrated through new examples in \examples/stdlib/map\ and \examples/stdlib/set\. Users can create maps from lists, insert, update, and delete entries, and perform set operations such as union, intersection, and difference. The map implementation supports custom comparators (e.g., for strings and integers) and provides methods like \getMin\ and \getMax\, while the set implementation ensures elements are stored in sorted order and supports uniqueness checks.

examples/stdlib/map · high confidence

Initial repository setup with Nix flake and Kiama submodule

This change establishes the foundational structure for the Effekt project. It introduces a Nix flake (\flake.nix\) that configures the build environment, including a community build of various Effekt projects, and adds the Kiama parser library as a Git submodule. Additionally, it sets up standard repository metadata files such as the MIT License, a CITATION.cff file for academic referencing, and a \.jvmopts\ file to configure JVM memory settings.

(repo-wide) · high confidence

Introduce Chez Scheme CPS backend for Effekt

Adds a new Chez Scheme backend that compiles Effekt programs to Continuation-Passing Style (CPS). This implementation introduces a custom runtime library (effekt.ss) that manages mutable state using a persistent data structure with generation tracking and snapshot/restore capabilities, and implements delimited continuations (reset/shift) using prompt identifiers to support advanced control flow features.

libraries/chez/cps · high confidence

Introduce Chez Scheme backends with Monadic and CPS compilation strategies

The Chez Scheme backend now supports 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 directly into Chez Scheme using monadic combinators like \run\, \pure\, and \then\, while the CPS backend first transforms the core representation into CPS before generating Chez Scheme code, utilizing built-in primitives for control flow and state. Both strategies share a common pretty-printing infrastructure and handle core constructs such as records, externs, and delimited control operators (shift/reset), providing users with alternative code generation paths for the Chez Scheme target.

effekt/shared/src/main/scala/effekt/generator/chez · high confidence

Introduce Chez Scheme monadic backend with delimited control and state support

Adds a new monadic code generation backend for the Chez Scheme target, implementing delimited control operators (reset/shift) and a state effect using an arena-based memory model. This enables users to compile programs utilizing monadic effects and local/global state to Chez Scheme, providing the necessary runtime primitives for control flow and mutable state management within the monadic framework.

libraries/chez/monadic · high confidence

Introduce JS runtime and built-in utility functions

The JavaScript backend now includes a dedicated runtime library (\effekt\_runtime.js\) and built-in utilities (\effekt\_builtins.js\). This adds support for delimited control operators (capture, shift, reset, resume) and local mutable state managed via an arena-based reference system with snapshot/restore capabilities. Additionally, standard library functions for showing, comparing, and printing values are implemented to support basic I/O and debugging in the JS environment.

libraries/js · high confidence

Introduce LLVM backend runtime system and standard library primitives

This change adds the foundational C and LLVM IR components for the LLVM backend, including a reference-counted runtime system (rts.ll) with support for sharing and erasing values, and a C standard library implementation (bytearray.c, io.c, main.c, types.c) that provides primitives for byte arrays, strings, file I/O via libuv, and basic console operations. The new files establish the low-level interface between the generated LLVM code and the host environment, enabling the backend to manage memory, handle asynchronous I/O, and execute basic program logic.

libraries/llvm · high confidence

Introduce delimited control operators (reset/shift) and state management for Chez Scheme

This change adds a new library at libraries/chez/callcc that implements delimited control operators (reset and shift) and state management (state) for Chez Scheme. The implementation introduces a new datatype system (define-datatype) and manages control state via a stack-based mechanism with arena-based memory allocation for state cells. It provides two distinct implementation variants: a tail-recursive version (tail.ss/tail0.ss) and a sequence-based version (seq.ss/seq0.ss), allowing users to utilize advanced control flow features like continuations and stateful computations within delimited scopes.

libraries/chez/callcc · high confidence

Introduce virtual file system and modular backend infrastructure

The compiler now supports a virtual in-memory file system, enabling it to run in JavaScript environments (such as the browser) without relying on the host OS file system. This is implemented via a new \VirtualModuleDB\ and \PathUtils\ in the JS module, which resolve imports and sources from an in-memory map. Additionally, the JVM module introduces a unified \Backend\ abstraction that encapsulates the compiler pipeline and runner for each target (JS, Chez Scheme, LLVM), and a new \Repl\ class provides an interactive interpreter with commands for type checking and status inspection.

repository · high confidence

Introduction of mutable map backed by JavaScript Map

A new mutable map implementation is now available in the JavaScript standard library, providing a \Map\[K, V\]\ type backed by the native JavaScript \Map\. This change introduces operations for creating an empty map, retrieving values (including unsafe access), updating key-value pairs, and extracting keys or values as arrays, enabling users to perform mutable map operations with side effects in their JavaScript programs.

libraries/js/mutable · high confidence

New Chez Scheme backend primitives and 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, custom string formatting for numbers and records, and handling for holes and unreachable code. Additionally, a portable regular expression library (\pregexp.scm\) has been added to support text processing capabilities within the backend.

libraries/chez/common · high confidence

New DOM manipulation library for JavaScript web targets

Added a new \web/dom\ module providing extern definitions for common browser DOM operations, including element retrieval (\getElementById\, \createElement\), attribute management (\setAttribute\, \getAttribute\), tree manipulation (\appendChild\, \innerHTML\), event handling (\onClick\), and asynchronous utilities (\requestIdleCallback\, \sleep\). This enables users to interact with the browser's Document Object Model directly from Effekt code.

libraries/js/web · high confidence

New I/O and concurrency benchmarks added

This update introduces a suite of new benchmark examples in the \examples/benchmarks/input\_output\ directory to stress-test the runtime's input/output and concurrency capabilities. The new tests include \channel\_primes\ and \sender\_receiver\ to validate channel-based communication, \networked\_numbers\ and \server\_client\ to exercise TCP networking, and several file-system benchmarks (\dyck\_one\, \financial\_format\, \large\_file\, \small\_files\, \word\_count\_ascii\, \word\_count\_utf8\) that test reading, writing, and parsing various data formats including UTF-8 and FIX protocol. Additionally, \interleave\_promises\ and \thread\_ring\ provide benchmarks for promise-based concurrency and thread synchronization.

_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, a minimal subprocess API (spawn, stdin/stdout/stderr handling), and concurrency primitives including promises, sleep, and await. These examples serve as usage references for the corresponding stdlib modules.

examples/stdlib/io · high confidence

New JavaScript web compiler and language server infrastructure

This change introduces the core Scala/Scala.js files for the JavaScript web backend and its language server. It adds a new \Backend\ class that instantiates the \JavaScriptWeb\ generator, an \EffektConfig\ trait that defines the default prelude modules (including \effekt\, \option\, \partial\, \stream\, \control\, \list\, \result\, \exception\, \array\, \char\, \bytearray\, \stringbuffer\, \string\, \ref\) and optimization settings, and a \LanguageServer\ class. The language server exposes LSP-compatible methods for type-checking, file I/O, compilation, and code intelligence features like symbol/hole hover and inferred captures, enabling IDE support in web environments.

effekt/js/src/main · high confidence

New LLVM backend implementation

The LLVM backend has been rewritten from scratch, introducing a new compilation pipeline that transforms the machine IR into LLVM IR. This implementation includes a new Transformer for code generation, a dedicated PrettyPrinter for emitting LLVM assembly, and support for C externs via verbatim declarations. The backend now handles specific LLVM features such as tail calls, aliasing annotations, and global constants, providing a fresh foundation for LLVM code generation in the compiler.

effekt/shared/src/main/scala/effekt/generator/llvm · high confidence

New OS detection and path utility abstractions

The JVM backend now includes dedicated utilities for operating system detection and cross-platform path handling. 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 new path utility object provides a platform-agnostic File abstraction with methods for path manipulation, canonicalization, and checking file existence within JARs, simplifying file system interactions across different operating systems.

effekt/jvm/src/main/scala/effekt/util · high confidence

New VM backend for IR generation

A new VM backend has been added to the compiler, which outputs the aggregated core module as an intermediate representation (IR). This backend, enabled via the 'vm' feature flag, runs the standard optimization pipeline (including dead code elimination) and is primarily used by the interpreter to access the optimized core program structure.

effekt/shared/src/main/scala/effekt/generator/vm · high confidence

New array standard library examples

The examples/stdlib/array directory now includes comprehensive demonstration files for a wide range 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\. Each operation is accompanied by a corresponding \.check\ file that validates the expected output, providing users with concrete usage patterns and verification for these standard library features.

examples/stdlib/array · high confidence

New array utility examples: copy, list conversion, and sum

Added example programs demonstrating new array capabilities: copying a portion of one array into another (copy), converting between lists and arrays and back (list\_conversion), and calculating the sum of array elements (sum).

examples/pos/array · high confidence

New benchmark runner and target-specific configuration files

The benchmarking infrastructure in examples/benchmarks has been updated to include a new runner (runner.effekt) that measures execution time and prevents compiler optimizations from dropping results. Additionally, new configuration files have been added for specific backends: config\_chez-cps.txt, config\_default.txt, config\_js.txt, and config\_llvm.txt. These files define the problem sizes and specific benchmarks (such as are\_we\_fast\_yet, duality\_of\_compilation, effect\_handlers\_bench, and input\_output) to be executed for each target, allowing users to run standardized performance tests against Chez, JavaScript, and LLVM backends.

examples/benchmarks · high confidence

New benchmarks for binary search, lambda calculus NbE, and dictionary-based algorithms

Added several new benchmark suites to the examples/benchmarks/other directory to exercise specific language features and performance characteristics. These include a binary search implementation using effects, a Normalization by Evaluation (NbE) demo for the untyped lambda calculus, a generator pattern using regions, and variadic combinators. Additionally, dictionary-based variants of the tracking map, unification, and word frequency benchmarks were added to compare against their map/set counterparts, providing insight into the performance of the new dictionary module.

examples/benchmarks/other · high confidence

New bidirectional effect examples added

Added a suite of new example files in the \examples/pos/bidirectional\ directory demonstrating bidirectional control flow and effect handling. These include \effectful\_block\_op.effekt\ for nested effect handlers, \higherorder.effekt\ and \higherorderobject.effekt\ for higher-order effect interfaces, \iterators.effekt\ for effect-based iteration, \pingpong.effekt\ for mutual effect recursion, \res\_obj\_boxed.effekt\ for boxed effect operations, \scheduler.effekt\ for a simple effect-based scheduler, and \typeparametric.effekt\ for parameterized extern interfaces. A new \selfrecursion.effekt\ example demonstrates the compiler's error handling for unsupported recursive effect declarations.

examples/pos/bidirectional · high confidence

New case studies for Effekt language documentation

Added a new collection of case studies in the \examples/casestudies\ directory to demonstrate the use of effects and handlers in the Effekt language. The new content includes a pull-based lexer, a backtracking parser, a pretty printer, an ANF transformation, automatic differentiation, a build system, probabilistic inference, and naturalistic DSLs. Each case study is provided as a literate Markdown file (\.effekt.md\) with embedded code examples and expected output check files (\.check\), and an overview README.md has been added to guide users through the recommended reading order.

examples/casestudies · high confidence

New common standard library modules for core data structures and utilities

The \libraries/common\ area now includes a comprehensive set of new standard library modules, providing foundational capabilities for the language. This adds a mutable \array\ module with bounds-checked access and resizing, a \bytearray\ module for efficient binary data handling (including sorting and copying), and a \bytestream\ module for serializing data with explicit endianness and bit-level operations. It also introduces a mutable \dictionary\ implementation based on a trie structure for efficient key-value storage, a \buffer\ module offering fixed-size ring buffers, and a \dequeue\ module implementing a functional double-ended queue. Supporting utilities include \args\ for accessing command-line arguments across backends, \bench\ for high-precision timing and benchmarking, \char\ for ASCII character manipulation and UTF-8 encoding logic, and \control\ for structured looping with break/continue support.

libraries/common · high confidence

New core compiler phases and infrastructure

The core compiler pipeline now includes dedicated phases for dead code elimination and name renaming (Renamer/TestRenamer), alongside a rewritten Transformer that converts source definitions into the new core representation. A new PrettyPrinter has been added to serialize core terms, supporting both human-readable and reparsable formats for debugging and testing. These changes introduce new internal phases and data structures for handling core terms, externs, and declarations, improving the modularity and correctness of the intermediate representation.

effekt/shared/src/main/scala/effekt/core · high confidence

New core optimizer pipeline with dead code elimination and normalization

The compiler now includes a new core optimizer phase that improves generated code by removing unused definitions and normalizing the intermediate representation. This optimization pipeline, implemented in the \effekt/core/optimizer\ package, introduces several new passes: \Deadcode\ performs reachability analysis to eliminate unused definitions, externs, and operations; \BindSubexpressions\ establishes a normal form by explicitly naming subexpressions and removing aliasing; \DirectStyle\ transforms local value bindings into direct function calls where possible; and \StaticArguments\ lifts static arguments. These passes are orchestrated by the \Optimizer\ phase, which runs dead code elimination, static argument transformation, and multiple rounds of normalization (including tail resumption removal) to produce cleaner, more efficient core code.

effekt/shared/src/main/scala/effekt/core/optimizer · high confidence

New filesystem I/O examples and async capabilities

Added new example programs in the \examples/stdlib/io/filesystem\ directory demonstrating file operations, including synchronous reading (\files.effekt\), writing, reading, and appending (\write\_read\_append.effekt\), a word-count utility (\wordcount.effekt\), and asynchronous concurrent file reading (\async\_file\_io.effekt\). These examples showcase the usage of \io/filesystem\ imports, \readFile\, \openForWriting\, \openForReading\, and \openForAppending\ functions, as well as the integration of \io/promise\ for non-blocking I/O tasks.

examples/stdlib/io/filesystem · high confidence

New object-oriented examples for higher-order composition and control effects

Added two new example files demonstrating object-oriented patterns in the Effekt language. The \higher\_order\_compose\_op\ example shows how to define and implement a \Compose\ interface for function composition, including a handler-based implementation and a direct object implementation. The \if\_control\_effect\ example demonstrates defining a \Control\ interface with an \ifelse\ operation, implemented as an object to handle conditional logic based on a boolean condition.

examples/pos/object · high confidence

New scanner examples for double parsing and comma-separated list reading

The scanner module now includes example files demonstrating how to parse double-precision floating-point numbers (including scientific notation) and how to read comma-separated integer lists using the \list\ combinator with \peeking\. These additions provide concrete usage patterns for the \scanner::readDouble\ function and the \list\ separator logic within the standard library examples.

examples/stdlib/scanner · high confidence

New standard library modules for channels, signals, promises, and environment variables

The \libraries/common/io\ area now includes several new modules that expand the runtime's capabilities. \io/channel\ and \io/signal\ introduce rendezvous channels and signals for concurrency primitives, allowing values to be exchanged between tasks. \io/promise\ adds a promise abstraction for asynchronous task completion. \io/env\ provides platform-specific functions to retrieve and check environment variables. Additionally, \io/console\ implements a console interface for reading lines and writing output, backed by Node.js readline. These modules are new additions to the standard library, not modifications to existing behavior.

libraries/common/io · high confidence

New string comparison, utility, and UTF-8 length operations

The standard library now includes new examples and test suites for string operations. Users can compare strings using standard operators (\<, \<=, \>, \>=) as demonstrated in the new \compare\ module. Additional string utilities are available, including \padLeft\ and \padRight\ for alignment, \utf8ByteCount\ for character encoding size, and various search/manipulation methods like \indexOf\, \isSubstringAt\, \split\, \join\, \toInt\, \endsWith\, and \lastIndexOf\. A new \utf8ByteLength\ property is also introduced to retrieve the byte length of a string in UTF-8 encoding, with specific behavior documented for different backends (Chez, JS, LLVM) regarding Unicode character indexing.

examples/stdlib/string · high confidence

New utility library for syntax highlighting, error reporting, and debugging

The \effekt/util\ package now includes a comprehensive set of utilities to enhance the development experience. Syntax highlighting is available for both ANSI terminals and HTML output via \AnsiHighlight\ and \HtmlHighlight\, enabling colored code display in consoles and web-based interfaces. Error reporting has been improved with \ColoredMessaging\, which formats compiler diagnostics with severity-based colors and context lines, and includes \EditDistance\ to power 'did you mean' suggestions for typos. Additionally, \Debug\ provides inline trace and assertion macros for runtime inspection, \Aborting\ offers safe \Option\ and \List\ operations, and \Trampoline\ supports stack-safe recursion.

effekt/shared/src/main/scala/effekt/util · high confidence

Support for nested namespaces and qualified name resolution

The namer now supports defining nested namespaces and resolving names using qualified paths (e.g., \outer::inner::Constructor\). Users can define types, records, and functions within nested namespace blocks and access them via fully qualified names in expressions and pattern matches. This change also enables the use of infix operators defined within namespaces and allows top-level declarations inside namespaces to be properly resolved.

examples/pos/namer · high confidence

Removals

Removal of JavaScript runtime and compiler infrastructure

The JavaScript standard library implementations (stdlib.js, stdlib-trampoline.js, stdlib-prompt.js) and the runtime support file (effekt.js) have been removed, along with the log4j configuration. On the compiler side, the core Scala components for parsing, naming, type checking, and evaluation (Parser, Namer, Typer, Evaluator, Driver) and the JavaScript backend code generation have been deleted, effectively removing the ability to parse, type-check, and compile Effekt programs to JavaScript.

src/main · high confidence

Removal of legacy JavaScript runtime and standard library files

The \lib\ directory no longer includes the core JavaScript runtime implementation (\effekt\_runtime.js\), the built-in utility functions (\effekt\_builtins.js\), the main module definition (\effekt.effekt\), or the file I/O bindings (\io/file.effekt\ and \io/file\_include.js\). These files, which previously provided the underlying 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 to explicit, composable phases

The compiler's internal architecture has been restructured to use an explicit, composable phase system. A new \Phase\ trait defines the pipeline stages, allowing phases to be chained and cached via a \Task\ abstraction. This change introduces a dedicated \Namer\ phase responsible for resolving symbols and handling imports, and a \Precedence\ module to manage infix operator associativity and binding strength. For users, this represents a significant internal refactoring that improves the modularity and maintainability of the compiler without altering the external language syntax or behavior.

effekt/shared/src/main/scala/effekt · high confidence

Behavioural changes

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

Introduce new JVM-based compiler driver and configuration system

The JVM binary now uses a new \Main\ entry point that delegates to a refactored \Driver\ and \EffektConfig\. This change introduces explicit command-line modes for compiling, building, running, and generating documentation, along with configurable options for backends (JS, Chez, LLVM), output paths, and optimization levels. The driver now handles LSP server mode, REPL, and standard compilation flows, while \EffektConfig\ centralizes argument parsing using Scallop, including support for LLVM version selection, prelude configuration, and IR output control.

effekt/jvm/src/main/scala/effekt · 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 web/node variants

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 new backend introduces separate compilation support for web environments via a virtual module layout, distinct from the standard CommonJS output used for Node.js. It includes a dedicated pretty-printer for generating readable JavaScript syntax, handles constructor and class generation with reflection and equality methods, and implements logic for analyzing module dependencies to generate correct linking code for separate compilation scenarios.

effekt/shared/src/main/scala/effekt/generator/js · high confidence

New assertion helpers and module database context traits

The context package introduces Assertions.scala, providing extension methods on Symbol and Type to safely cast symbols to specific types (e.g., ValueParam, InterfaceType) with clear error reporting, and ModuleDB.scala, defining the ModuleDB trait that handles source resolution, module loading, and validation of main function definitions.

effekt/shared/src/main/scala/effekt/context · high confidence

Refactor symbol identity and introduce dedicated printer components

Symbol equality and hashing now rely on strict, eagerly assigned integer IDs rather than lazy name-based strings, ensuring consistent identity across compiler phases. The symbols package gains new dedicated printers (DeclPrinter, SignaturePrinter, TypePrinter) that provide structured, readable output for declarations, signatures, and types, replacing ad-hoc formatting. Built-in types and effects are now explicitly defined in a new builtins module, standardizing core type representations.

effekt/shared/src/main/scala/effekt/symbols · high confidence

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

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

Simplified build configuration with centralized versioning and new tooling

The project build has been restructured to use a dedicated Scala object (EffektVersion.scala) for managing the version number (currently 0.80.0), replacing previous methods. The build system now relies on sbt 1.9.7 and includes plugins for Scala.js (1.16.0), code formatting (scalafmt 2.4.6), and code fixing (scalafix 0.11.1). Additionally, new sbt tasks have been introduced to automatically generate documentation comments from source code markers and to collect, build, and measure benchmarks using hyperfine.

project · 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 examples demonstrating name-based implicits; Add exception combinator examples; Add regression tests for issue \#603; Added example programs for the standard library show function; Added lambda-lifting examples for nested effects and pattern matching; Added negative test cases for interface type inference and argument validation; Added negative test cases for lambda capture and escape errors; Added negative test cases for object implementation validation; Added test coverage for stdlib test utilities; Expanded LLVM backend test coverage for language features; Expanded capture and resource tracking examples; Expanded negative test coverage for type checking and error reporting; Expanded positive test suite for Effekt language features; Negative test cases for name-based implicits; New test infrastructure and coverage for the core compiler pipeline; New test infrastructure for Effekt backends and compiler components; Removed legacy JUnit-based parser and regression tests; Standard library examples and test harnesses; Updated type inference examples for the Effekt language.

Dependencies

Initial release of the Effekt language compiler and tooling

This change introduces the initial build infrastructure for the Effekt language, establishing the project as version 0.80.0. It adds a \package.json\ for the npm distribution (\@effekt-lang/effekt\) and a \pom.xml\ to aggregate dependency licenses using Maven. The build is configured with Scala 3.3.6 and includes key dependencies such as LSP4J (0.23.1) for language server support, Gson (2.8.9) for JSON handling, JLine (2.14.6) for the REPL, and Scallop (4.1.0) for CLI argument parsing. The entry point is set to \effekt.Main\, and the build includes tasks to assemble binaries, manage licenses, and handle platform-specific shebangs for executable JARs.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 55.

Lenses

  • Code Health 81
  • Architecture 92
  • Maturity 40
  • Readiness 68
  • Security 63

Changes since last survey

  • 300 commits — 262 feature/other, 38 fixes

By area

  • effekt/shared — 72 commits
  • (root) — 60 commits
  • effekt/jvm — 35 commits
  • examples/pos — 30 commits
  • libraries/common — 21 commits
  • examples/stdlib — 20 commits
  • examples/neg — 18 commits
  • .github/workflows — 17 commits
  • examples/benchmarks — 7 commits
  • examples/tour — 6 commits
  • examples/casestudies — 4 commits
  • libraries/js — 3 commits
  • effekt/js — 2 commits
  • libraries/llvm — 2 commits
  • .github/actions — 1 commit
  • examples/core — 1 commit
  • libraries/chez — 1 commit

Notable commits

  • fix: Disable shrink-wrapping to work around an LLVM bug on x86_64 tail calls (#1463)
  • fix: Fix #1165: improve position info for UnboxInference errors (#1167)
  • fix: Fix #603 (#1267)
  • fix: Fix '*=' lexing (#1413)
  • fix: Fix 'bench::relevant', making sure benchmarks don't drop what they're computing (#1461)
  • fix: Fix Char-related builtins in the VM backend (#1422)
  • fix: Fix argument count check (#1406)
  • fix: Fix backtracked mutable state on Chez CPS (#1329)
  • fix: Fix backtracking in nested overloads (#1007)
  • fix: Fix cake pattern bug with more cake pattern (#1068)
  • fix: Fix char default (#1095)
  • fix: Fix contification of blocks that are passed as an argument (#1417)
  • fix: Fix core type in try ... with ... body (#1042)
  • fix: Fix crash on joining boxes with different capture sets (#1284)
  • fix: Fix empty list of holes not being published (#1027)
  • fix: Fix error on namespace (#1227)
  • fix: Fix extern calling convention on AArch64 (#1445)
  • fix: Fix lexer regression when parsing nested holes (#1144)
  • fix: Fix negative double parsing in 'json::readDouble' (#1359)
  • fix: Fix off-by-one in spans (#1216)
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by watchdog.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 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9f3ae5134b4ec52ff4cff40963bc2b87660b6a5e — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.