stylish-haskell is a Haskell code formatter that focuses on tidying up common formatting issues without trying to reformat every expression in a source file. It is particularly useful for keeping imports, language pragmas and record declarations consistent.
Rather than enforcing a complete coding style, the application makes targeted changes that improve readability while leaving most of the original layout alone. Its behaviour can be customised through a YAML configuration file.
This is free and open source software.
Key Features
- Aligns and sorts import statements.
- Groups and wraps {-# LANGUAGE #-} pragmas, can remove (some) redundant pragmas.
- Removes trailing whitespace.
- Aligns branches in case and fields in records.
- Converts line endings (customizable).
- Replaces tabs by four spaces (turned off by default).
- Replaces some ASCII sequences by their Unicode equivalents (turned off by default).
- Format data constructors and fields in records.
- Integrates with Haskell Language Server for formatting within compatible editors.
Website: github.com/haskell/stylish-haskell
Support:
Developer: Jasper Van der Jeugt
License: 3-clause BSD License
stylish-haskell is written in Haskell. Learn Haskell with our recommended free books and free tutorials.
Related Software
| Haskell Linters | |
|---|---|
| Ormolu | Formatter for Haskell source code |
| HLint | Suggests improvements to Haskell code |
| Fourmolu | Formatter for Haskell source code, fork of Ormolu |
| LiquidHaskell | Refinement type checker for verifying properties of Haskell code |
| stylish-haskell | Simple Haskell code prettifier |
| hindent | Extensible Haskell pretty printer |
| Stan | Haskell STatic ANalyser |
| Floskell | Flexible Haskell source code pretty printer |
| Weeder | Perform whole-program dead-code analysis |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.