# Install hlint with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Haskell source code suggestions. Version 3.10 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:hlint
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install hlint
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install hlint
```

  Evidence: MacPorts ports tree: devel/hlint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add hlint
```

  Evidence: Alpine Linux edge package indexes: hlint from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install hlint
```

  Evidence: Debian stable package indexes: hlint from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install ghc-deriving-aeson
```

  Evidence: Fedora Rawhide package metadata: ghc-deriving-aeson from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#hlint
```

  Evidence: nixpkgs package indexes: hlint from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S hlint
```

  Evidence: Arch Linux sync databases: hlint from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install ghc-hlint
```

  Evidence: openSUSE Tumbleweed package metadata: ghc-hlint from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:hlint
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/hlint>
- **Version:** 3.10
- **Source summary:** Haskell source code suggestions
- **Homepage:** <https://github.com/ndmitchell/hlint>
- **Repository:** <https://github.com/ndmitchell/hlint>
- **Upstream docs:** <https://github.com/ndmitchell/hlint#readme>
- **License:** BSD-3-Clause
- **Source archive:** <https://hackage.haskell.org/package/hlint-3.10/hlint-3.10.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- hlint (cli)
- hlint (alias)

## Dependencies

- gmp

## Build dependencies

- cabal-install
- ghc@9.12

## Uses from macOS

- libffi
- ncurses

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.10
- Local data: ok
- Upstream repository: https://github.com/ndmitchell/hlint
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

HLint is Neil Mitchell's Haskell source-code suggestion tool. It parses Haskell modules and reports style, simplification, redundancy, and maintainability hints, with configuration through .hlint.yaml and integrations across editors, CI systems, and Haskell IDE tooling.

### Project history

The hlint.cabal file gives Neil Mitchell as author and maintainer and carries a copyright line beginning in 2006. Neil Mitchell's publication page ties HLint to a longer research and tooling thread around transformation and analysis of Haskell source code, including a 2007 thesis seminar and a 2008 PhD thesis on functional-program transformation and analysis.

HLint's README describes its core purpose as suggesting possible improvements such as alternative functions, code simplification, and spotting redundancies. It deliberately operates on modules in isolation rather than typechecking whole projects, a tradeoff that lets it parallelize, run incrementally, and analyze code that may not compile yet.

In 2017, HLint 2.0 moved configuration toward YAML. Neil Mitchell's release post says earlier configuration used specially crafted Haskell files, while HLint 2.0 added .hlint.yaml search from the working directory upward and encouraged YAML because the Haskell-based format had become overloaded.

By 2020, HLint had undergone a major parser migration. Mitchell's MuniHac talk abstract describes HLint as over 14 years old, notes changes in license, project name, source control, and configuration, and explains the move from haskell-src-exts toward the GHC API via ghc-lib as GHC compatibility became more important.

### Adoption history

HLint became a standard Haskell development utility because it can be run cheaply during local development, code review, and CI. The README documents installation through the ordinary Haskell toolchain, direct binary use in CI, and workflows that generate an initial report before committing a project-specific .hlint.yaml baseline.

The README also documents broad integration: editor plugins, Haskell Language Server, ghc-mod, Intero, GHC source plugins, Code Climate, Danger, Restyled, HLint test helpers, GitHub Actions, and code-scanning workflows. That integration footprint made HLint visible both to individual Haskell developers and to larger codebases enforcing house style.

### How it is used

A normal run is hlint source, where source is a file or directory. HLint recursively scans .hs and .lhs files, reports file/line locations, severity, the code it found, and a possible replacement. For larger projects, hlint . --report creates an HTML report, and hlint . --default can create a .hlint.yaml file that records outstanding hints.

HLint suggestions are intentionally advisory. The README warns that most hints are good ideas in many circumstances but should not be applied blindly, especially when contributing to another project or when language extensions and laziness semantics matter.

### Why package nerds care

HLint is one of the canonical Haskell developer-tool packages: small enough to run locally, opinionated enough to teach idioms, and integrated enough to show up in editors, CI, code review bots, and language-server diagnostics.

For package maintainers, HLint matters because it externalizes style and simplification rules into a configurable tool. Projects can ship .hlint.yaml to encode local decisions, silence accepted warnings, and add custom hints without requiring every contributor to internalize the entire style guide.

Its long parser and configuration evolution also mirrors the Haskell ecosystem's own tooling history: from custom parsers and Haskell-flavored config toward YAML project files, ghc-lib, and tighter integration with the compiler and language-server stack.

### Timeline

- 2006: HLint authorship/copyright line begins in hlint.cabal.
- 2007: Neil Mitchell presented work on transformation and analysis of Haskell source code.
- 2008: Neil Mitchell's PhD thesis on transformation and analysis of functional programs was published.
- 2013: The ndmitchell/hlint GitHub repository was created.
- 2017-04-06: HLint 2.0 introduced YAML configuration and .hlint.yaml search.
- 2020-09-11: The MuniHac talk described HLint's migration to the GHC API parser via ghc-lib.

### Related projects

- GHC and ghc-lib: parser/compiler infrastructure used by HLint's later parser architecture.
- haskell-src-exts: the parser library HLint used before the GHC API migration.
- Haskell Language Server, ghc-mod, Intero: Haskell tooling integrations named by the README.
- apply-refact: the refactoring helper used when HLint applies suggestions with --refactor.

### Sources

- <https://api.github.com/repos/ndmitchell/hlint>
- <https://ndmitchell.com/>
- <https://neilmitchell.blogspot.com/2017/04/hlint-20-with-yaml-configuration.html>
- <https://raw.githubusercontent.com/ndmitchell/hlint/master/README.md>
- <https://raw.githubusercontent.com/ndmitchell/hlint/master/hlint.cabal>
- input: source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .hlint.yaml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** hlint
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - hlint - 3.6.1-1+b1: normalized package name match | Debian stable package indexes: hlint from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Haskell source code suggestions | https://github.com/ndmitchell/hlint#readme
- Debian apt - libghc-hlint-dev - 3.6.1-1+b1: normalized package name match | Debian stable package indexes: libghc-hlint-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Haskell source code suggestions | https://github.com/ndmitchell/hlint#readme
- Debian apt - libghc-hlint-doc - 3.6.1-1: normalized package name match | Debian stable package indexes: libghc-hlint-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Haskell source code suggestions; documentation | https://github.com/ndmitchell/hlint#readme
- Debian apt - libghc-hlint-prof - 3.6.1-1+b1: normalized package name match | Debian stable package indexes: libghc-hlint-prof from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Haskell source code suggestions; profiling libraries | https://github.com/ndmitchell/hlint#readme
- Nix - hlint: normalized package name match | nixpkgs package indexes: hlint from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - hlint - 3.5-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: hlint from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Haskell source code suggestions | https://github.com/ndmitchell/hlint#readme
- Ubuntu apt - libghc-hlint-dev - 3.5-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libghc-hlint-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Haskell source code suggestions | https://github.com/ndmitchell/hlint#readme
- Ubuntu apt - libghc-hlint-doc - 3.5-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libghc-hlint-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Haskell source code suggestions; documentation | https://github.com/ndmitchell/hlint#readme
- Ubuntu apt - libghc-hlint-prof - 3.5-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libghc-hlint-prof from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Haskell source code suggestions; profiling libraries | https://github.com/ndmitchell/hlint#readme
- apk - hlint - 3.10-r0: normalized package name match | Alpine Linux edge package indexes: hlint from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Linter for Haskell source code | https://github.com/ndmitchell/hlint
- dnf - ghc-deriving-aeson - 0.2.10-12.fc44: normalized package name match | Fedora Rawhide package metadata: ghc-deriving-aeson from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Haskell deriving-aeson library | https://hackage.haskell.org/package/deriving-aeson
- dnf - ghc-deriving-aeson-devel - 0.2.10-12.fc44: normalized package name match | Fedora Rawhide package metadata: ghc-deriving-aeson-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Haskell deriving-aeson library development files | https://hackage.haskell.org/package/hlint
- dnf - ghc-deriving-aeson-doc - 0.2.10-12.fc44: normalized package name match | Fedora Rawhide package metadata: ghc-deriving-aeson-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Haskell deriving-aeson library documentation | https://hackage.haskell.org/package/hlint
- dnf - ghc-deriving-aeson-prof - 0.2.10-12.fc44: normalized package name match | Fedora Rawhide package metadata: ghc-deriving-aeson-prof from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Haskell deriving-aeson profiling library | https://hackage.haskell.org/package/hlint
- dnf - ghc-ghc-lib-parser-ex - 9.12.0.0-12.fc44: normalized package name match | Fedora Rawhide package metadata: ghc-ghc-lib-parser-ex from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Haskell ghc-lib-parser-ex library | https://hackage.haskell.org/package/ghc-lib-parser-ex
- dnf - ghc-ghc-lib-parser-ex-devel - 9.12.0.0-12.fc44: normalized package name match | Fedora Rawhide package metadata: ghc-ghc-lib-parser-ex-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Haskell ghc-lib-parser-ex library development files | https://hackage.haskell.org/package/hlint


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [cabal-install](https://www.automicvault.com/pkg/brew/cabal-install/) - Build dependency declared by Homebrew.
- [ghc@9.12](https://www.automicvault.com/pkg/brew/ghc-9-12/) - Build dependency declared by Homebrew.
- [checkstyle](https://www.automicvault.com/pkg/brew/checkstyle/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linting, static-analysis.
- [credo](https://www.automicvault.com/pkg/brew/credo/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linting, static-analysis.
- [detekt](https://www.automicvault.com/pkg/brew/detekt/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linting, static-analysis.
- [wartremover](https://www.automicvault.com/pkg/brew/wartremover/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linting, static-analysis.
- [datadog-static-analyzer](https://www.automicvault.com/pkg/brew/datadog-static-analyzer/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [eslint](https://www.automicvault.com/pkg/brew/eslint/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [globstar](https://www.automicvault.com/pkg/brew/globstar/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [go-critic](https://www.automicvault.com/pkg/brew/go-critic/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [hadolint](https://www.automicvault.com/pkg/brew/hadolint/) - Both packages touch the same language runtime or ecosystem. Shared terms: analysis, cli, developer, developer-tools, gmp.
- [swiftlint](https://www.automicvault.com/pkg/brew/swiftlint/) - Local package facts share a topical domain. Shared terms: analysis, cli, code, code-quality, developer.

## Combined YAML source

View the package source record on GitHub. [combined/hlint.yml](https://github.com/automic-vault/db/blob/main/combined/hlint.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
