Skip to main content

AILANG Playground

Try AILANG right in your browser! This REPL runs entirely client-side using WebAssembly - no server required.

Loading AILANG REPL...

Quick Examples​

Basic Arithmetic​

1 + 2
10 * 5
42.0 / 2.0

Lambda Functions​

AILANG is a functional language at heart:

(\x. x * 2)(21)

Let Bindings​

Define and use variables:

let double = \x. x * 2 in double(21)

Higher-Order Functions​

Compose and apply functions:

let double = \x. x * 2 in
let triple = \x. x * 3 in
double(5) + triple(4)

Type Inference​

Check the type of any expression:

:type \x. \y. x + y

Pattern Matching​

Work with tuples:

let first = \pair. match pair with | (a, b) -> a in first((1, 2))

REPL Commands​

CommandDescription
:helpShow all available commands
:type <expr>Display the type of an expression
:instancesShow available type class instances
:resetClear the environment and start fresh

Learn More​

Technical Details​

This playground is powered by:

  • WebAssembly: The full AILANG interpreter compiled to WASM (~13 MB, ~3 MB compressed)
  • Go: Core language implementation (GOOS=js GOARCH=wasm)
  • React: UI component framework

The WASM binary is rebuilt automatically on every release via GitHub Actions.

Browser limitations:

  • Module imports work (:import std/prelude auto-loaded)
  • File I/O and network effects disabled for security
  • Use local installation for full effect system

Found a Bug?​

If you encounter issues with the playground, please report them on GitHub.