ormolu
ormolu copied to clipboard
A formatter for Haskell source code
I sometimes end up with long chains of operators with identical precedence. E.g., in some parser code, I have ```haskell infixr 3 >~< -- run two parsers with whitespace between...
Depends on https://github.com/mrkkrp/path-io/pull/97 --- Update to `ghc-lib-parser-9.10`, build with GHC 9.10.1 in CI, drop GHC 9.4, update bounds. - See the changelog for details about the new syntactic features in...
**Describe the bug** Ormolu sometimes eats line breaks after infix operators, and replaces them with hanging indents. **To Reproduce** Run `ormolu` on code similar to: ```hs test :: Spec test...
Without `DerivingStrategies`, it's reasonable to think that "deriving instance" together defines a standalone deriving statement, but with `DerivingStrategies`, it seems more intuitive for `deriving` + the strategy to be one...
**Describe the bug** Idempotency check fails for comment plus record syntax. **To Reproduce** The simplest piece of code I could come up with that causes the idempotency check to fail:...
One of the stated goals is "The formatting style aims to result in minimal diffs", but imports do not meet this goal. From ```hs import Utils ( funcB, funcC, )...
**Is your feature request related to a problem? Please describe.** In larger codebases, it's common to have large ADTs that constantly have new options added. Some examples are: * Routes...
**Is your feature request related to a problem? Please describe.** Looks like ormolu does not support literate Haskell, see [details](https://github.com/haskell/haskell-language-server/issues/3912). **Describe the solution you'd like** Able to format literate Haskell....
**Describe the bug** Here are a bunch of strange comment placements that I've noticed. **To Reproduce** ## Positive example This one looks good ### Input, & Output ```hs example =...
Follow-up issue from https://github.com/fourmolu/fourmolu/issues/348. It would be great if, instead of having to specify files to format via a directory or a complicated call to `git`, `ormolu` would simply detect...