packages feed

haskell-formatter 2.0.2 → 2.0.3

raw patch · 5 files changed

+49/−35 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

LICENSE view
@@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Benjamin Fischer+Copyright (c) 2014–2020 Benjamin Fischer  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
README.md view
@@ -4,8 +4,31 @@ [![License](https://img.shields.io/github/license/evolutics/haskell-formatter.svg)](LICENSE) [![Package](https://img.shields.io/hackage/v/haskell-formatter.svg)](https://hackage.haskell.org/package/haskell-formatter) +This is [**deprecated**](#deprecation-notice).+ The Haskell Formatter formats Haskell source code. It is strict in that it fundamentally rearranges code. +## Deprecation notice++The Haskell Formatter is deprecated. If you think it should still be maintained, please let me know.++Take a look at the following projects, which aim at formatting Haskell code, too.++- [brittany](https://github.com/lspitzner/brittany)+- [hfmt](https://github.com/danstiner/hfmt)+- [hindent](https://github.com/mihaimaruseac/hindent)+- [stylish-haskell](https://github.com/jaspervdj/stylish-haskell)++Personally, I like **hindent,** to which you can migrate as follows.++| Use case                       | Haskell Formatter                                      | hindent                    |+| ------------------------------ | ------------------------------------------------------ | -------------------------- |+| Format file in-place           | `haskell-formatter --force --input a.hs --output a.hs` | `hindent a.hs`             |+| Format multiple files in-place | [Not supported out-of-the-box](#formatting-many-files) | `hindent a.hs b.hs`        |+| Format stdin to stdout         | `haskell-formatter`                                    | `hindent`                  |+| Order imports                  | Done by [default](#style-configuration)                | `hindent --sort-imports …` |+| Get help                       | `haskell-formatter --help`                             | `hindent --help`           |+ ## Installation  Install it by running@@ -107,27 +130,18 @@  # Indentation lengths in characters. indentations:-    class:  8    # "class" and "instance" declarations.-    do:     3    # "do" notation. -    case:   4    # Body of "case" expressions.-    let:    4    # Declarations in "let" expressions.-    where:  6    # Declarations in "where" clauses.-    onside: 2    # Continuation lines which would otherwise be offside.+  class: 8 # "class" and "instance" declarations.+  do: 3 # "do" notation.+  case: 4 # Body of "case" expressions.+  let: 4 # Declarations in "let" expressions.+  where: 6 # Declarations in "where" clauses.+  onside: 2 # Continuation lines which would otherwise be offside.  # Decides which parts of the code to sort. order:-    # Sequence of import declarations.-    import_declarations: true+  # Sequence of import declarations.+  import_declarations: true -    # Entities of import lists.-    import_entities: true+  # Entities of import lists.+  import_entities: true ```--## Related Projects--You may like to have a look at the following projects, which aim at formatting Haskell code, too.--- [brittany](https://github.com/lspitzner/brittany)-- [hfmt](https://github.com/danstiner/hfmt)-- [hindent](https://github.com/chrisdone/hindent)-- [stylish-haskell](https://github.com/jaspervdj/stylish-haskell)
format.sh view
@@ -1,4 +1,4 @@- #!/bin/bash+#!/bin/bash  set -o errexit set -o nounset
haskell-formatter.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.2.+-- This file has been generated from package.yaml by hpack version 0.33.0. -- -- see: https://github.com/sol/hpack ----- hash: 2a3ff370b294ff45e9969b40e7fe03b3d4928324aaf898a53fe6abbf81ab4d38+-- hash: 05d013e35d78adf2e82a413fa6e40acd5e702e70931ad5cb816b2eabdd2a6338  name:           haskell-formatter-version:        2.0.2+version:        2.0.3 synopsis:       Haskell source code formatter description:    The Haskell Formatter formats Haskell source code. It is strict in that it fundamentally rearranges code. category:       Development@@ -15,7 +15,7 @@ bug-reports:    https://github.com/evolutics/haskell-formatter.git/issues author:         Benjamin Fischer maintainer:     Benjamin Fischer <benjamin.fischer@evolutics.info>-copyright:      (C) 2014–2019 Benjamin Fischer+copyright:      (C) 2014–2020 Benjamin Fischer license:        MIT license-file:   LICENSE build-type:     Simple
testsuite/resources/examples/default_style.yaml view
@@ -14,17 +14,17 @@  # Indentation lengths in characters. indentations:-    class:  8    # "class" and "instance" declarations.-    do:     3    # "do" notation. -    case:   4    # Body of "case" expressions.-    let:    4    # Declarations in "let" expressions.-    where:  6    # Declarations in "where" clauses.-    onside: 2    # Continuation lines which would otherwise be offside.+  class: 8 # "class" and "instance" declarations.+  do: 3 # "do" notation.+  case: 4 # Body of "case" expressions.+  let: 4 # Declarations in "let" expressions.+  where: 6 # Declarations in "where" clauses.+  onside: 2 # Continuation lines which would otherwise be offside.  # Decides which parts of the code to sort. order:-    # Sequence of import declarations.-    import_declarations: true+  # Sequence of import declarations.+  import_declarations: true -    # Entities of import lists.-    import_entities: true+  # Entities of import lists.+  import_entities: true