100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Programming

Unison (language)

Content-addressed functional language with built-in distributed programming

AdvancedLanguage1.7K learners

Unison is a statically typed functional programming language distinguished by content-addressed code storage, where every function definition is identified by a hash of its syntax tree rather than its name, enabling novel approaches to…

Definition

Unison is a statically typed functional programming language distinguished by content-addressed code storage, where every function definition is identified by a hash of its syntax tree rather than its name, enabling novel approaches to dependency management, distributed computing, and code deployment without traditional build artifacts.

Overview

Unison, developed initially by Paul Chiusano and a small team (later organized under Unison Computing), rethinks a foundational assumption of most programming languages: that source code is stored and identified as text files organized by name. Instead, Unison represents each function or definition as an abstract syntax tree, and that definition is identified by a cryptographic hash computed from its content and the hashes of everything it depends on — a scheme called content-addressed code, borrowed conceptually from systems like Git's object storage but applied at the level of individual functions rather than whole files. This has several unusual consequences. Because a definition's hash depends only on its actual logic and dependencies, renaming a function doesn't create a new version of it — names are just human-friendly labels layered on top of the underlying hash-identified code, stored separately in a naming index. It also means there is no traditional dependency hell: two libraries can depend on different, incompatible versions of a shared function without conflict, because each version is a distinct, independently addressable hash rather than a named package version. Unison's tooling reflects this: instead of text files and a conventional build step, code lives in a content-addressed codebase, edited through a specialized tool (Unison Codebase Manager, or UCM) rather than a standard text editor and compiler pipeline, though a text-based syntax is used for writing and viewing code. Unison also has first-class support for distributed programming: because functions are content-addressed and self-contained (their dependencies are fully resolved by hash), Unison programs can transparently serialize and send a computation, including its code, to run on a remote node, forming the basis of the Unison Cloud platform for building distributed systems without hand-rolling RPC or serialization boilerplate. The language itself is a statically typed, pure functional language in the tradition of Haskell, with an algebraic effect system (abilities) for managing side effects. Unison remains a niche, research-influenced language with a small but active community, most suited to teams building distributed systems or exploring new approaches to code versioning and deployment, rather than a mainstream general-purpose language choice.

Key Features

  • Content-addressed code: every definition identified by a hash of its syntax and dependencies
  • Names are separate, mutable labels layered on top of immutable hash-identified definitions
  • No traditional dependency conflicts, since differing versions coexist as distinct hashes
  • Statically typed, pure functional language with an algebraic effect ('abilities') system
  • Built-in support for transparently distributing computation across nodes
  • Specialized codebase manager (UCM) replacing conventional text-file-based tooling
  • Unison Cloud platform for distributed systems built on content-addressed code
  • No traditional build step in the conventional sense, since code is stored pre-parsed by hash

Use Cases

Building distributed systems without hand-written RPC or serialization code
Exploring alternative approaches to dependency and version management
Research and experimentation in programming language and tooling design
Serverless-style distributed computation via the Unison Cloud platform
Codebases requiring safe, conflict-free coexistence of multiple function versions
Teaching and exploring algebraic effect systems in a practical language

Alternatives

Haskell · Haskell FoundationErlang · EricssonGleam · Louis Pilfold

History

Unison is a statically typed, purely functional programming language whose defining idea is content-addressed code: each definition is identified not by its name but by a hash of its content, with names kept as separate metadata. Storing the serialized syntax tree keyed by hash yields a range of benefits — no build step, trivial renames, cached test results, and a smoother path to distributed programming where code can be shipped by hash. Unison was created by Paul Chiusano and Rúnar Bjarnason, co-authors of the book Functional Programming in Scala, and is developed at Unison Computing, a public-benefit corporation they co-founded with Arya Irani. It targets making distributed systems dramatically easier to build.

Sources

Frequently Asked Questions