ormolu
« Back to VersTracker
Description:
Formatter for Haskell source code
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  @tweagio  |  formulae.brew.sh
Category: Developer tools
Tags: haskell formatter developer-tools code-quality ghc
Install: brew install ormolu
About:
Ormolu is a command-line tool for formatting Haskell source code that aims to be consistent with the language's syntax and community style. It uses the GHC parser for accuracy and provides zero-configuration operation, making it easy to integrate into projects. Unlike other formatters, it preserves existing code structure where possible while ensuring consistent output.
Key Features:
  • Zero-configuration formatting with sensible defaults
  • Uses GHC's own parser for 100% accurate Haskell parsing
  • Idempotent output - running multiple times produces same result
  • Supports both cabal and stack projects out of the box
  • Detailed error messages for syntax issues
Use Cases:
  • Automated code formatting in CI/CD pipelines
  • Standardizing code style across development teams
  • Pre-commit hooks for maintaining consistent formatting
  • Reformatting legacy Haskell codebases
Alternatives:
  • stylish-haskell – More configurable but less consistent; uses regex-based parsing which can break on complex syntax
  • hindent – More opinionated about line breaks and indentation; less faithful to original code structure
Version History
Detected Version Rev Change Commit
Sep 24, 2025 1:10pm 0 VERSION_BUMP e98d3250
Sep 16, 2025 10:02am 0 VERSION_BUMP 279fe209
Jan 5, 2025 11:34pm 0 VERSION_BUMP b898e8e2