From b2d8a1ed51b88894d336707580e4aa2ba0aaab33 Mon Sep 17 00:00:00 2001 From: Lennart Spitzner Date: Sun, 16 Jun 2019 21:54:55 +0200 Subject: [PATCH] Bump to 0.12.0.0, Update copyright, readme, changelog --- ChangeLog.md | 39 ++++++++++++++++++++++++++++ README.md | 69 +++++++++++++++++++++++++++----------------------- brittany.cabal | 5 ++-- 3 files changed, 80 insertions(+), 33 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5dcb20c..0f193e8 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,44 @@ # Revision history for brittany +## 0.12.0.0 -- June 2019 + +* Support for ghc-8.6 (basic support, not necessarily all new syntactic + extensions) +* Support -XExplicitNamespaces and -XPatternSynonyms +* Allow a --dry-run sort of operation via flag "-c/--check-mode" + (thanks to Doug Beardsley @mightybyte) +* Include file name in errors about unsupported syntax nodes (thanks to @5outh) +* Partially implement layouting class instances: Layouts children, but + falls back on ghc-exactprint for the instance head + (thanks to Rupert Horlick @ruhatch) +* Implement layouting for type synonyms (thanks to Rupert Horlick @ruhatch) +* Support -XMagicHash, -XUnboxedTuples (thanks to Sergey Vinokurov @sergv) +* Support -XQuasiQuotes (no formatting applied to the splices; they are simply + retained without causing the dreaded "Unknown construct: HsSpliceE{}") + - `lconfig_allowHangingQuasiQuotes` controls whether multi-line + QuasiQuotes are allowed to start at the end of the current line, or + whether they are always placed in new lines. +* Bugfixes: + - Fix rare-case alignment bug with IndentPolicyMultiple (#144) + - Make inline layout config apply to module header (#151) + - Fix unaligned import-hiding layout (#150) + - Fix idempotence violation for comments around if-then-else (#167) + - Fix comments having an effect on far-away parent node's layout (#159) + - Fix imports of type operators ("symbolic data types") + (thanks to Phil Hazelden @ChickenProp) + - Work around GHC and cabal-install misfeature ".ghc.environment files" + that could break brittany in unexpected and hard-to-understand ways + - Stop removing empty lines before `where` keyword in a couple of cases + - Fix functions with mixing prefix/infix style causing error (#234) +* Changes to layout: + - Align usage of spaces for record update vs record construction (#126) + - More indentation to import-hiding-paragraph (follow-up to #150 fix) + - Record construction and update now are layouted in the same way + (thanks to Evan Rutledge Borden @eborden) + - Stop allowing single-line layout when there are comments between + arguments (#214) (thanks to @matt-noonan) +* Various build-instructions and editor integrations + ## 0.11.0.0 -- May 2018 * Support for ghc-8.4 diff --git a/README.md b/README.md index f51e5fc..8b3a21d 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ log the size of the input, but _not_ the full input/output of requests.) # Other usage notes -- Supports GHC versions `8.0`, `8.2` and `8.4`. +- Supports GHC versions `8.0`, `8.2`, `8.4`, `8.6`. - included in stackage with lts>=10.0 (or nightlies dating to >=2017-11-15) - config (file) documentation is lacking. - some config values can not be configured via commandline yet. @@ -58,41 +58,15 @@ log the size of the input, but _not_ the full input/output of requests.) # Installation -- via `cabal` "old-build" - - ~~~~.sh - # optionally: - # mkdir brittany - # cd brittany - # cabal sandbox init - cabal install brittany --bindir=$HOME/.cabal/bin # -w $PATH_TO_GHC_8_0 - ~~~~ - -- via `cabal new-build` - - ~~~~.sh - cabal unpack brittany - cd brittany-0.11.0.0 - # cabal new-configure -w $PATH_TO_GHC_8_0 - cabal new-build exe:brittany - # and it should be safe to just copy the executable, e.g. - cp `find dist-newstyle/ -name brittany -type f | xargs -x ls -t | head -n1` $HOME/.cabal/bin/ - ~~~~ - -- via `stack` using a sufficiently recent stackage snapshot (dated to >= 2017-11-15) +- via `stack` ~~~~.sh stack install brittany # --resolver lts-10.0 ~~~~ - (earlier ltss did not include `brittany` yet, but the repo should contain a - `stack.yaml` that works with ghc-8.0.) - -- on ArchLinux via [the brittany AUR package](https://aur.archlinux.org/packages/brittany/) - using `aura`: - ~~~~.sh - aura -A brittany - ~~~~ + If you use an lts that includes brittany this should just work; otherwise + you may want to clone the repo and try again (there are several stack.yamls + included). - via `nix`: ~~~.sh @@ -100,6 +74,39 @@ log the size of the input, but _not_ the full input/output of requests.) nix-env -i ./result ~~~ +- via `cabal v1-build` + + ~~~~.sh + # optionally: + # mkdir brittany + # cd brittany + # cabal sandbox init + cabal install brittany --bindir=$HOME/.cabal/bin # -w $PATH_TO_GHC_8_x + ~~~~ + +- via `cabal v2-install` + + ~~~~.sh + cabal v2-install brittany + ~~~~ + +- via `cabal v2-build`, should v2-install not work: + + ~~~~.sh + cabal unpack brittany + cd brittany-0.11.0.0 + # cabal new-configure -w $PATH_TO_GHC_8_x + cabal new-build exe:brittany + # and it should be safe to just copy the executable, e.g. + cp `find dist-newstyle/ -name brittany -type f | xargs -x ls -t | head -n1` $HOME/.cabal/bin/ + ~~~~ + +- on ArchLinux via [the brittany AUR package](https://aur.archlinux.org/packages/brittany/) + using `aura`: + ~~~~.sh + aura -A brittany + ~~~~ + # Editor Integration #### Sublime text diff --git a/brittany.cabal b/brittany.cabal index 649358b..cf8c054 100644 --- a/brittany.cabal +++ b/brittany.cabal @@ -1,5 +1,5 @@ name: brittany -version: 0.11.0.0 +version: 0.12.0.0 synopsis: Haskell source code formatter description: { See . @@ -12,7 +12,8 @@ license: AGPL-3 license-file: LICENSE author: Lennart Spitzner maintainer: Lennart Spitzner -copyright: Copyright (C) 2016-2018 Lennart Spitzner +copyright: Copyright (C) 2016-2019 Lennart Spitzner + Copyright (C) 2019 PRODA LTD category: Language build-type: Simple cabal-version: 1.18