HLint
github.com
What it is
HLint is free software for analyzing Haskell source and suggesting possible improvements. It can point out alternative functions, simpler expressions, and redundant code. Every hint identifies the file and line, gives a severity and description, shows the code found, and proposes a replacement. Projects can configure behavior in a .hlint.yaml file, adding custom hints or ignoring selected suggestions. The --refactor flag applies some recommendations and requires the refactor executable from the apply-refact package on PATH. The --report flag creates an interactive HTML findings report. HLint runs on Linux, macOS, and Windows, with listed integrations including editor plugins, Haskell Language Server, ghc-mod, Intero, a GHC source plugin, Code Climate, and GitHub Actions. It analyzes one module at a time without type or scope knowledge. Version 3.10 is listed as released February 2, 2024. It is distributed under a BSD-style license.
Spec sheet
- Purpose
- HLint suggests possible improvements to Haskell code, including alternative functions, simplifications, and redundancies.Read 7 Oct 2026 · github.com
- Audience
- The project suggests that beginners may focus on warning hints and that larger projects can add custom hints or rules.Read 7 Oct 2026 · github.com
- Integrations
- The project lists editor plugins, Haskell Language Server, ghc-mod, Intero, a GHC source plugin, Code Climate, and GitHub Actions among its integrations.Read 7 Oct 2026 · github.com
- License
- The repository provides HLint under a BSD-style license that permits redistribution and use in source and binary forms subject to listed conditions.Read 7 Oct 2026 · github.com
- CI
- The project documents use with Travis CI, AppVeyor, and Azure Pipelines, and says its supplied command works on Windows, Mac, and Linux.Read 7 Oct 2026 · github.com
- Configuration
- Projects can configure HLint with a .hlint.yaml file, including custom hints and ignored suggestions.Read 7 Oct 2026 · github.com
- Known caveat
- The project warns that some transformations may change program semantics or cause values to default to different types.Read 7 Oct 2026 · github.com
- Latest release shown
- The GitHub releases page identifies version 3.10, released February 2, 2024.Read 7 Oct 2026 · github.com
- Output
- Each hint identifies the file and line, its severity and description, the code found, and a possible replacement.Read 7 Oct 2026 · github.com
- Preprocessor limit
- HLint checks only one conditional branch at a time for C preprocessor input, based on the defined macros.Read 7 Oct 2026 · github.com
- Refactoring
- The --refactor flag can apply some suggestions and requires the refactor executable from the apply-refact package on PATH.Read 7 Oct 2026 · github.com
- Reports
- The --report flag generates an interactive HTML report of findings.Read 7 Oct 2026 · github.com
- Scope limit
- HLint analyzes one module at a time and does not know types or which names are in scope.Read 7 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Free plan at free
- Runs on Linux, macOS, and Windows
- Custom hints and ignored suggestions via configuration
- Interactive HTML reports available
- Editor and CI integrations listed
Limits
- Analyzes one module at a time
- Does not know types or names in scope
- Some transformations may change program semantics
- C preprocessor checking covers one branch at a time
Who it suits
HLint suits Haskell developers who want warnings, configurable rules, editor or CI integration, and optional automated refactoring. Beginners can concentrate on warning hints, while larger projects can add custom rules.
Verdict
HLint provides configurable Haskell suggestions with detailed, line-level explanations and broad development integrations. Review proposed transformations because the project warns they can alter behavior or type defaults.
Where Specifiction places it
- Linters#19 of 337.7