MiniML is my ongoing compiler project for a small ML-style language, written in Haskell. The goal is to compile to WebAssembly 3.0 using continuation-passing style, and eventually add algebraic effects.

So far, I have implemented lexing, parsing, semantic analysis, and a direct evaluator. The language supports let bindings, conditionals, booleans, signed 64-bit integers, arithmetic, and comparisons. Semantic analysis resolves names, checks types, and reports errors with source locations.

For example, this program evaluates to 42:

let x = 6 in
let y = x + 1 in
x * y