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 | shIt is also available via cargo install hx-cli, Homebrew, Scoop, Chocolatey, AUR, and mise. Verify it:
hx --version2. Create a project
hx new my-app
cd my-appThis 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, pass a compiler and a runtime profile:
hx build # GHC (default)
hx build --compiler=bhc --profile=server # BHC, server profilehx 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 issuesOne tool for the whole workflow — build, test, run, format, lint, and publish.
Where to next
- New to the why? Read the manifesto.
- Coming from Cabal or Stack? See hx vs Cabal and Stack.
- Curious about the compiler? See BHC vs GHC and the BHC site.
- Full reference: hx docs and BHC docs.