HLint
HLint is a free tool that flags possible improvements in Haskell source code, such as alternative functions, simplifications and redundant code.
What HLint is
HLint is a free tool that flags possible improvements in Haskell source code, such as alternative functions, simplifications and redundant code. Each hint identifies a file and line, gives severity and a description, and displays the code found with a possible replacement. Projects can use a .hlint.yaml file to create custom hints or silence suggestions. The --refactor option can apply some changes, but it requires the refactor executable from the apply-refact package on PATH. The --report option produces an interactive HTML report. HLint works on Linux, macOS and Windows, and the project lists editor plugins, Haskell Language Server, ghc-mod, Intero, Code Climate and GitHub Actions among its integrations. It examines one module at a time and does not know types or which names are in scope. The project also warns that some transformations may change program behavior or type defaults. For C preprocessor input, it checks one branch at a time according to defined macros. Beginners can focus on warning hints, while larger projects can add custom rules.
Good
- Free tool for Haskell source analysis.
- Hints show file, line, severity and replacement.
- Projects can add custom hints or ignore suggestions.
- Interactive HTML reports are available.
- Integrates with listed editors and CI services.
Watch out
- Analyzes one module at a time.
- Does not know types or names in scope.
- Some transformations may change program behavior.
- C preprocessor checks only one branch at a time.
Who it suits
HLint suits Haskell developers who want suggestions to review while editing or in a CI workflow. Beginners can focus on warning-level hints, and larger projects can define their own rules.
Verdict
HLint can surface code simplifications and alternatives, with controls for project-specific rules and reports. Review suggestions before applying them, since the project warns that some transformations may affect behavior or types.
Plans and prices
From HLint's own pricing page, checked 7 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Free | Free | Haskell source analysis and suggestions · install with Cabal or use a binary release |
The facts
Each one read from HLint's own pages, with the date it was checked.
What it does
- Audience
- The project suggests that beginners may focus on warning hints and that larger projects can add custom hints or rules.checked 7 Oct 2026
- CI
- The project documents use with Travis CI, AppVeyor, and Azure Pipelines, and says its supplied command works on Windows, Mac, and Linux.checked 7 Oct 2026
- Configuration
- Projects can configure HLint with a .hlint.yaml file, including custom hints and ignored suggestions.checked 7 Oct 2026
- Integrations
- The project lists editor plugins, Haskell Language Server, ghc-mod, Intero, a GHC source plugin, Code Climate, and GitHub Actions among its integrations.checked 7 Oct 2026
- Known caveat
- The project warns that some transformations may change program semantics or cause values to default to different types.checked 7 Oct 2026
- Latest release shown
- The GitHub releases page identifies version 3.10, released February 2, 2024.checked 7 Oct 2026
- License
- The repository provides HLint under a BSD-style license that permits redistribution and use in source and binary forms subject to listed conditions.checked 7 Oct 2026
- Output
- Each hint identifies the file and line, its severity and description, the code found, and a possible replacement.checked 7 Oct 2026
- Preprocessor limit
- HLint checks only one conditional branch at a time for C preprocessor input, based on the defined macros.checked 7 Oct 2026
- Purpose
- HLint suggests possible improvements to Haskell code, including alternative functions, simplifications, and redundancies.checked 7 Oct 2026
- Refactoring
- The --refactor flag can apply some suggestions and requires the refactor executable from the apply-refact package on PATH.checked 7 Oct 2026
- Reports
- The --report flag generates an interactive HTML report of findings.checked 7 Oct 2026
- Scope limit
- HLint analyzes one module at a time and does not know types or which names are in scope.checked 7 Oct 2026
Alternatives to HLint
- 1

Cppcheck
Free planOpen sourceLinuxmacOSSelf-hostedWindows7.4Free plan - 2
JSHint
Free planOpen sourceWebAPIExtensionLinux7.4Free plan - 3
Flake8
Free planOpen sourceAPILinuxmacOSSelf-hosted7.3Free plan - 4
PMD
Free planLinuxmacOSSelf-hostedWindows6.8Free plan - 5
SwiftLint
Free planLinuxmacOSWindows6.6Free plan - 6

Ruff
Free planWebLinuxmacOSSelf-hosted6.5Free plan
