hfmt: Haskell source code formatter

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Inspired by gofmt. Built using hlint, hindent, and stylish-haskell.


[Skip to Readme]

Properties

Versions 0.0.1.0, 0.0.2.0, 0.0.2.1, 0.0.2.2, 0.0.2.3, 0.0.2.3, 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3.0, 0.2.3.1, 0.3.0.0
Change log None available
Dependencies ansi-wl-pprint, base (>=4.8 && <5), Cabal, Diff, directory, filepath, haskell-src-exts, hfmt, hindent (>=4.5 && <5), hlint (>=1.9.13 && <2), HUnit, optparse-applicative, pipes, pretty, stylish-haskell (>=0.5 && <0.6), text [details]
License MIT
Author Daniel Stiner
Maintainer Daniel Stiner <daniel.stiner@gmail.com>
Category Language
Home page http://github.com/danstiner/hfmt
Bug tracker http://github.com/danstiner/hfmt/issues
Source repo head: git clone git://github.com:danstiner/hfmt.git
Uploaded by danielstiner at 2016-09-18T19:46:02Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for hfmt-0.0.2.3

[back to package description]

hfmt

Hackage license Build Status

hfmt is a tool for formatting Haskell programs. Currently it is simply a gofmt style wrapper of the excellent tools hlint, hindent, and stylish-haskell.

Installation

with stack

$ cabal install hfmt

with cabal

$ stack install hfmt

Usage

Check all Haskell source under the current directory:

hfmt

Overwrite files with formatting suggestions:

hfmt -w

Help text

λ hfmt --help
hfmt - format Haskell programs

Usage: hfmt.exe [-d|--print-diffs] [-s|--print-sources] [-l|--print-paths]
                [-w|--write-sources] [PATH]
  Operates on Haskell source files, reformatting them by applying suggestions
  from HLint, hindent, and stylish-haskell. Inspired by the gofmt utility.

Available options:
  -h,--help                Show this help text
  -d,--print-diffs         If a file's formatting is different, print a diff.
  -s,--print-sources       If a file's formatting is different, print its
                           source.
  -l,--print-paths         If a file's formatting is different, print its path.
  -w,--write-sources       If a file's formatting is different, overwrite it.
  PATH                     Explicit paths to process.
                            - A single '-' will process standard input.
                            - Files will be processed directly.
                            - Directories will be recursively searched for
                              source files to process.
                            - .cabal files will be parsed and all specified
                              source directories and files processed.
                            - If no paths are given, the current directory will
                              be searched for .cabal files to process, if none
                              are found the current directory will be
                              recursively searched for source files to process.