Get started

From zero to a running Haskell project

Install one tool, create a project, pick a compiler, and build. The whole loop, in a few commands.

1. Install hx

hx is a single static binary. Install it with the one-line script:

curl -fsSL https://arcanist.sh/hx/install.sh | sh

It is also available through Homebrew (brew install arcanist-sh/tap/hx), WinGet, Scoop, aqua, pkgx and Nix, or from source with cargo install --git https://github.com/arcanist-sh/hx hx-cli. Verify it:

hx --version

2. Create a project

hx init my-app
cd my-app

This scaffolds a project with a deterministic, checksum-verified TOML lockfile. If you already have a Cabal or Stack project, hx reads your existing .cabal file directly — there is nothing to migrate.

3. Pick a compiler

By default hx uses your managed GHC toolchain. To build with the Basel Haskell Compiler instead, pick the backend:

hx build                  # GHC (default)
hx build --backend bhc    # BHC

To make BHC the default and choose a runtime profile, set it in hx.toml:

[compiler]
backend = "bhc"

[compiler.bhc]
profile = "server"

hx manages both toolchains for you — no separate ghcup or manual installs.

4. Build, test, run

hx build      # compile
hx test       # run the test suite
hx run        # run the app
hx fmt        # format
hx doctor     # diagnose toolchain issues

One tool for the whole workflow — build, test, run, format, lint, and publish.

Where to next