# HLint

> Suggests possible improvements to Haskell code

Source: https://talira.ai/catalog/hlint-1w7agqn6
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [developer tools / linting](https://talira.ai/categories/developer-tools/linting)
- Platforms: linux, macos, windows[^3]
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Creator: Neil Mitchell

HLint is the standard linter for [Haskell](https://talira.ai/catalog/haskell-jjq1dx6f.md). It reads Haskell files or whole directories and suggests improvements: alternative functions (`concatMap` for `concat . map`), simpler code, fewer brackets and redundancies, each marked as a warning or a suggestion with what it found and what to write instead. Hints are configured in a `.hlint.yaml` file, where you can turn hints off, add your own and set the language extensions. With the `--refactor` flag and the `apply-refact` tool it rewrites files to apply many of its hints. It's built into haskell-language-server, Code Climate and Restyled, and a GitHub Action runs it for code scanning. Neil Mitchell maintains it, BSD-3-Clause licensed.

## Links

- GitHub: https://github.com/ndmitchell/hlint

## Problems it solves

- lint my Haskell code and get suggestions for simpler, more idiomatic expressions
- find redundant brackets, unused patterns and needless lambdas in a Haskell project
- enforce custom style rules across a Haskell codebase in CI
- automatically apply lint suggestions to Haskell files
- show Haskell lint hints in my editor through the language server
- run a Haskell linter as GitHub code scanning on pull requests

## Features

- suggestions to use better functions, simplify code and remove redundancy
- warnings and suggestions with the found code and its replacement
- .hlint.yaml configuration: ignore hints, add custom hints, set extensions
- --refactor applies hints automatically with apply-refact
- runs on files or recursively on directories
- built into haskell-language-server
- Emacs, Vim and Atom integrations
- GitHub code scanning through the hlint-scan action

## Limitations

- HLint checks each module in isolation without type information or knowledge of which names are in scope, so some suggestions may need type signatures or change behaviour

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.28 out of 1.
Signals: backing 0.20, extensibility 0.20.

- created by Neil Mitchell

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [Haskell](https://talira.ai/catalog/haskell-jjq1dx6f.md)

## Alternatives

- [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md): Detect and fix coding standard violations in PHP
- [ansible-lint](https://talira.ai/catalog/ansible-lint-r3bpcyc4.md): Checks playbooks for practices and behavior that could potentially be improved
- [TFLint](https://talira.ai/catalog/tflint-4a8xgw05.md): A Pluggable Terraform Linter

## Sources

[^1]: https://github.com/ndmitchell/hlint/blob/master/LICENSE (checked 24 Nov 2026)
[^2]: https://github.com/ndmitchell/hlint (checked 24 Nov 2026)
[^3]: https://github.com/ndmitchell/hlint/releases/latest (checked 24 Nov 2026)
