---
title: "Haskell SDK"
description: "Unofficial SDK for authoring Temporal workflows and activities in the Haskell programming language."
canonical: "https://temporal.io/code-exchange/haskell-sdk.md"
source: "https://temporal.io/code-exchange/haskell-sdk"
published: "2026-03-05"
authors:
  - "Andrew Smith"
languages:
  - "Unofficial SDK"
reviewed_by_temporal: true
community_contribution: true
---

# Haskell SDK

Unofficial SDK for authoring Temporal workflows and activities in the Haskell programming language.

- [Unofficial Temporal Haskell SDK](https://github.com/MercuryTechnologies/hs-temporal-sdk/)

[Temporal](https://temporal.io/index.md) is a durable execution system that transparently makes your code durable, fault-tolerant, and simple.

This project provides an unofficial Haskell SDK along with supporting packages for authoring workflows and activities.

> [!WARNING]
> This project is still under heavy development. It is in production use at [Mercury](https://mercury.com/), but we currently make no stability guarantees for external users of the project.

For documentation and samples, see:

- [General Temporal docs](https://docs.temporal.io/)

## Development Environment

This project uses [Nix](https://nixos.org/guides/nix-package-manager.html) to manage the development environment and dependencies. Nix ensures a reproducible and consistent build environment across different systems.

> [!NOTE]
> Stack support is for convenience, but not guaranteed by CI to compile consistently.

It is recommended to set up [direnv](https://direnv.net/) and [nix-direnv](https://github.com/nix-community/nix-direnv) to automatically load the Nix environment when you enter the project directory. After installing `direnv`, run the following command in the project root to bootstrap the development environment.

```bash
direnv allow
```

### Useful Development Commands

`nix develop --impure` enters the development shell for the Haskell program if you aren't using `direnv`. This shell includes the necessary tools and dependencies for development, such as GHC, Cabal, and the Rust toolchain.

Inside the development shell, you can use cabal commands as usual. Cabal is the official build tool for this project.

- `nix build .#{packageName}-{ghcVersion}` builds the given package for a given GHC version.
- `nix build .#temporal_bridge` builds the Rust library (`temporal_bridge`) that provides bindings to the Temporal Core library.
- `devenv up` starts a local Temporal server for development and testing purposes.

The flake.nix file defines different shells for each supported GHC version (`ghc96`, `ghc98`, `ghc910`). You can enter the shell for a specific GHC version with the following command:

```bash
nix develop .#{ghcVersion} --impure
```

Replace `{ghcVersion}` with the desired GHC version (e.g., `ghc96`, `ghc98`, `ghc910`).

> [!NOTE]
> The first time you run nix develop or nix build, Nix will download and build all the necessary dependencies, which may take some time. Subsequent runs will be faster as Nix will reuse the cached dependencies.
