hfmt icon indicating copy to clipboard operation
hfmt copied to clipboard

Format Haskell programs. Inspired by the gofmt utility.

Results 14 hfmt issues
Sort by recently updated
recently updated
newest added

Currently `hfmt` is a few major versions behind on stylish-haskell and hlint. This causes it to not build anymore on nixpkgs.

hfmt transforms,for example `(P.*)` into `(P .*)` which is wrong Example: ```haskell {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PackageImports #-} module Hack ( mul ) where import qualified "base" Prelude...

Haddock uses inline comments inside the export list for separating sections. Hfmt misformats them into something that `haddock` chokes on. Example: ```haskell module Test ( -- * Heading foo )...

``` stack install hfmt hfmt-0.2.3.1: configure hfmt-0.2.3.1: build -- While building package hfmt-0.2.3.1 using: /Users/levkowalski/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always" Process exited with code: ExitFailure 1 Logs have...

I just received this error message from `hfmt`: ``` $ hfmt lib/Category.hs "Error reformatting lib/Category.hs: Error in stylish-haskell: Language.Haskell.Stylish.Parse.parseModule: could not parse lib/Category.hs: ParseFailed (SrcLoc \".hs\" 19 27) \"DataKinds language...

Currently we load config for each formatted exactly once, using the working directory the program was launched with. This obviously will not work in all cases, for several of the...

It is not very obvious when using the `--write-sources` option when there are additional errors hiding as suggestions that were not automatically applied. They should probably be printed out.

By creating a stack-fmt executable, it will be possible to quickly run `stack fmt` and to see any formatting errors for the entire project, even if you are not currently...

enhancement

Maybe we could have incremental formatting? I.e. when run for a directory, reformatting only the files with updated times (since last formatting)? Here’s an example of how to do that...

For better reliability and to avoid locking files this tool should consider writing a temp file and then renaming it to replace the target file instead of opening it for...

enhancement