FREEDOM251

Freedom251 › Code Formatting Tools

Ormolu

Free plan LinuxMacWebWindows

Visit Ormolu Alternatives Pricing

Ormolu's own site

What Ormolu is

Ormolu formats Haskell source code using GHC's parser, avoiding parsing issues associated with haskell-src-exts. It applies one consistent style intended to produce minimal diffs, and that style cannot be configured. The project aims for idempotence, so code already formatted to its rules should not change when formatted again. Ormolu provides release binaries for Linux, macOS, and Windows and can also be installed with cabal or stack. Ormolu Live provides a browser version. The README lists editor integrations for Emacs, VS Code, and Vim through neoformat or vim-ormolu, while Haskell Language Server includes built-in support for using Ormolu. For continuous integration, the project recommends the run-ormolu GitHub Action. Ormolu reads default language extensions and dependencies from the matching Cabal file; .ormolu files can supply fixity overrides and module re-export instructions. CPP support is experimental and limited to simple cases where conditionals surround top-level declarations. The project is open source and listed as free.

Who it suits

Ormolu suits Haskell developers who want a consistent formatter for local use, editor workflows, or continuous integration. It is available as binaries, package installations, and a browser version.

What it does well

  • Uses GHC's parser
  • Offers binaries for Linux, macOS, and Windows
  • Works with Emacs, VS Code, and Vim integrations
  • Haskell Language Server has built-in formatter support
  • Can read defaults from a matching Cabal file

What to know first

  • Formatting style cannot be configured
  • CPP support is experimental
  • CPP support is limited to simple top-level conditionals

Limits

Ormolu applies one style that cannot be configured. CPP handling is experimental and works only in simple cases where conditionals surround top-level declarations.

Plans

PlanBilled and limitsPrice
OrmoluOpen-source Haskell formatterFree

As github.com lists them, read 9 Oct 2026. The maker's own page has the final word.

Getting started

  1. Open the Ormolu GitHub project or try Ormolu Live in a browser.
  2. Download a release binary for Linux, macOS, or Windows, or install with cabal or stack.
  3. Use an available Emacs, VS Code, or Vim integration, or Haskell Language Server support.
  4. Add the run-ormolu GitHub Action to a project’s continuous integration workflow.
  5. Use a matching Cabal file for default language extensions and dependencies, and .ormolu files for supported instructions.

Ormolu is a Haskell source formatter built for predictable, low-noise changes. It is a strong fit for developers and teams standardising one style across local editors and CI, but less suitable when a project needs configurable layout rules or extensive C preprocessor support.

Overview

Ormolu uses GHC’s parser rather than haskell-src-exts, reducing a common source of parsing trouble for Haskell code. Its formatter deliberately follows one consistent style and aims for minimal diffs. It also targets idempotence: code that already conforms should not be reformatted on each run. In practice, that makes pull-request changes easier to review and helps a team enforce a shared baseline. The trade-off is fundamental: there are no style switches for teams with established preferences that differ from Ormolu’s rules.

Key features

Project context comes from the matching Cabal file, which Ormolu uses to read default language extensions and dependencies. An .ormolu file can add fixity overrides and module re-export instructions. These mechanisms help the formatter understand a project without turning its core style into a configurable system. A library API is also available for integrating formatting into Haskell tooling.

Installation is flexible. Release binaries cover Linux, macOS, and Windows, while cabal and stack provide package-manager installation paths. Ormolu Live supplies a browser version for trying the formatter or checking a snippet without a local setup. Editor routes include Emacs, VS Code, and Vim through neoformat or vim-ormolu. Haskell Language Server has built-in support for using Ormolu, so formatting can sit in an existing language-server workflow rather than requiring a separate manual command.

For automation, the project recommends the run-ormolu GitHub Action to keep a repository formatted in CI. That combination of editor, language-server, browser, and CI entry points is valuable when a team wants one formatter applied consistently at different stages.

CPP support remains experimental and is limited to simple cases in which conditionals surround top-level declarations. Codebases with more involved preprocessor structure should treat this as a material compatibility constraint, not a minor edge case.

Pricing

Ormolu costs nothing under its open-source plan. The plan is an open-source Haskell formatter with no paid tier, seat charge, usage quota, trial period, or renewal term stated. That makes it suitable for individuals, commercial teams, and CI environments that want to deploy the same tool without a software subscription. Its license permits redistribution and use in source and binary forms subject to stated conditions, and the software is provided “as is,” so adopters should account for those license terms and their own support responsibilities.

Platforms

Supported platforms are Linux, macOS, Windows, and web. Local binaries cover the three desktop operating systems, cabal and stack offer alternative installation methods, and Ormolu Live covers browser use. Editor integrations are available for Emacs, VS Code, and Vim; Haskell Language Server provides another route for editor-based formatting. The project is focused on Haskell rather than a multi-language workspace.

Who it's for

Ormolu suits Haskell developers who want a single enforced style, small formatting diffs, and output that remains stable on repeated runs. Teams can apply it while editing, through Haskell Language Server, and in GitHub CI, reducing the chance that local and automated checks disagree. It is also a sensible choice for open-source projects that want to redistribute a formatter without licensing fees.

Look elsewhere if contributors need configurable indentation or layout rules, or if the code relies heavily on CPP patterns beyond top-level declaration guards. Ormolu’s project-aware Cabal and .ormolu support adds context, but it does not change the underlying style.

Pros and cons

Pros

  • GHC-based parsing: Uses the compiler’s parser to avoid haskell-src-exts parsing problems.
  • Predictable diffs: One style, minimal-change goals, and idempotence keep reviews focused.
  • Broad workflow coverage: Binaries, cabal, stack, browser use, editor integrations, Haskell Language Server, and a GitHub Action support different working habits.
  • Project awareness: Cabal discovery plus .ormolu fixity and re-export instructions help formatting reflect project context.
  • No software fee: The open-source plan is free to redistribute and use under its license conditions.

Cons

  • No configurable style: Teams cannot tune the formatter to match a preferred house style.
  • Limited CPP: Experimental support handles only simple top-level declaration conditionals.
  • Haskell-only focus: It does not serve mixed-language formatting needs.
  • “As is” licensing posture: Users receive no stated paid support or warranty through the free plan.

Alternatives

Code Formatting Tools is the broader directory when you want to compare formatters across languages and workflows.

Choose Fourmolu instead when you want another free, open-source Haskell formatter, particularly if its Linux, web, and Windows coverage fits your deployment needs. Black is the relevant free alternative for Python projects, while Fantomas targets F# and .NET. Pick Prettier for a free, open-source formatter spanning a wider set of development environments and extension/API routes. goimports is the free open-source command-line choice for Go. Ruff fits Python teams seeking Astral’s open-source developer tooling. rustfmt is the straightforward free option for Rust. Accessibility Test Framework for Android is an Android-focused free tool rather than a Haskell formatter.

Verdict

Choose Ormolu when a Haskell project benefits from one uncompromising style, stable minimal diffs, and the ability to enforce it from editor through CI at no software cost. Choose another formatter when style configuration is a requirement or your code depends on complex CPP; Ormolu’s consistency is its chief strength, and its fixed rules and limited preprocessor handling are the boundaries.

Verdict

Ormolu provides a single-style formatter for Haskell with command-line, browser, editor, and language-server paths. Its fixed style may not fit projects that need configurable formatting, and CPP handling is limited.

Questions

What does Ormolu format?

Ormolu formats Haskell source code.

How much does Ormolu cost?

Ormolu is free and open source; its listed plan price is free.

Which platforms can I use it on?

The project supports Linux, macOS, Windows, and the web. Release binaries are provided for Linux, macOS, and Windows, and Ormolu Live is available in a browser.

Can I configure its formatting style?

No. Ormolu uses one consistent style that does not admit configuration.

Which editor integrations are available?

The project lists Emacs, VS Code, and Vim integrations. Haskell Language Server also has built-in support for Ormolu as a formatter.

Is Ormolu open source?

Yes. Its license permits redistribution and use in source and binary forms subject to stated conditions, and provides the software “as is.”

Facts from Ormolu's own pages

Browser version
Ormolu can be tried in a browser through Ormolu Live. · github.com, 9 Oct 2026
CI integration
The project recommends the run-ormolu GitHub Action to keep a project formatted. · github.com, 9 Oct 2026
Editor integrations
The README lists integrations for Emacs, VS Code, and Vim through neoformat or vim-ormolu. · github.com, 9 Oct 2026
Formatting style
It implements one consistent formatting style that does not admit configuration and aims to produce minimal diffs. · github.com, 9 Oct 2026
Idempotence
The project aims to ensure formatting already formatted code does not change it. · github.com, 9 Oct 2026
Installation
The release page provides binaries for Linux, macOS, and Windows, and the project can also be installed with cabal or stack. · github.com, 9 Oct 2026
Language server
Haskell Language Server has built-in support for using Ormolu as a formatter. · github.com, 9 Oct 2026
License
The project’s license permits redistribution and use in source and binary forms subject to stated conditions and provides the software “as is.” · github.com, 9 Oct 2026
Limitations
CPP support is experimental and works only in simple cases where CPP conditionals surround top-level declarations. · github.com, 9 Oct 2026
Maintainer history
The README credits Mark Karpov as author and main maintainer during his employment at Tweag from 2019 to 2026. · github.com, 9 Oct 2026
Maker
Tweag describes itself as a software innovation lab and lists Ormolu among its Haskell ecosystem tools. · tweag.io, 9 Oct 2026
Parser
It uses GHC’s parser to avoid parsing problems caused by haskell-src-exts. · github.com, 9 Oct 2026
Project configuration
Ormolu finds the matching Cabal file to read default language extensions and dependencies, and supports fixity overrides and module re-export instructions in .ormolu files. · github.com, 9 Oct 2026
Purpose
Ormolu is a formatter for Haskell source code. · github.com, 9 Oct 2026

Where Ormolu stands on Freedom251

Look at these too