From 2245e8abd410b68a1eae85d27826c23a992afcc6 Mon Sep 17 00:00:00 2001 From: Tycho Grouwstra Date: Sat, 2 Jun 2018 20:45:20 +0200 Subject: add stylish-haskell-vscode --- README.markdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.markdown b/README.markdown index 1fe00be..ea23a47 100644 --- a/README.markdown +++ b/README.markdown @@ -149,6 +149,13 @@ Atom integration [ide-haskell]: https://atom.io/packages/ide-haskell [atom-beautify]: Https://atom.io/packages/atom-beautify +Visual Studio Code integration +------------------------------ + +[stylish-haskell-vscode] for VSCode supports `stylish-haskell`. + +[stylish-haskell-vscode]: https://github.com/vigoo/stylish-haskell-vscode + Using with Continuous Integration --------------------------------- -- cgit v1.2.3 From cd68fe8452e86748973c20e87feb38c16a979226 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Sat, 14 Jul 2018 03:56:53 +0800 Subject: Allow yaml 0.9 Builds fine and all tests pass. --- stylish-haskell.cabal | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stylish-haskell.cabal b/stylish-haskell.cabal index 31f9e23..188d7ad 100644 --- a/stylish-haskell.cabal +++ b/stylish-haskell.cabal @@ -60,7 +60,7 @@ Library mtl >= 2.0 && < 2.3, semigroups >= 0.18 && < 0.19, syb >= 0.3 && < 0.8, - yaml >= 0.7 && < 0.9 + yaml >= 0.7 && < 0.10 Executable stylish-haskell Ghc-options: -Wall @@ -82,7 +82,7 @@ Executable stylish-haskell haskell-src-exts >= 1.18 && < 1.21, mtl >= 2.0 && < 2.3, syb >= 0.3 && < 0.8, - yaml >= 0.7 && < 0.9 + yaml >= 0.7 && < 0.10 Test-suite stylish-haskell-tests Ghc-options: -Wall @@ -131,7 +131,7 @@ Test-suite stylish-haskell-tests haskell-src-exts >= 1.18 && < 1.21, mtl >= 2.0 && < 2.3, syb >= 0.3 && < 0.8, - yaml >= 0.7 && < 0.9 + yaml >= 0.7 && < 0.10 Source-repository head Type: git -- cgit v1.2.3 From 7b1906339890bda5414dc44e16d498e56667eff2 Mon Sep 17 00:00:00 2001 From: Shinya Yamaguchi Date: Mon, 23 Jul 2018 09:52:23 +0900 Subject: Fix latest.sh script to user correct tags --- scripts/latest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/latest.sh b/scripts/latest.sh index dc5c345..b3e3760 100755 --- a/scripts/latest.sh +++ b/scripts/latest.sh @@ -8,7 +8,7 @@ echo Downloading and running $PACKAGE... RELEASES=$(curl --silent https://github.com/jaspervdj/$PACKAGE/releases) URL=https://github.com/$(echo $RELEASES | grep -o '\"[^\"]*-linux-x86_64\.tar\.gz\"' | sed s/\"//g | head -n1) -VERSION=$(echo $URL | sed -e 's/.*-\([\.0-9]\+\)-linux-x86_64\.tar\.gz/\1/') +VERSION=$(echo $URL | sed -e 's/.*-\(v[\.0-9]\+-linux-x86_64\)\.tar\.gz/\1/') TEMP=$(mktemp --directory .$PACKAGE-XXXXX) cleanup(){ -- cgit v1.2.3 From ea534a99e7f4684906ae4aff7328673b1ec4e3b5 Mon Sep 17 00:00:00 2001 From: Dan Burton Date: Wed, 5 Dec 2018 13:41:07 -0500 Subject: Relax constraints, allow containers 0.6.* --- stylish-haskell.cabal | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stylish-haskell.cabal b/stylish-haskell.cabal index 188d7ad..d811274 100644 --- a/stylish-haskell.cabal +++ b/stylish-haskell.cabal @@ -52,7 +52,7 @@ Library aeson >= 0.6 && < 1.4, base >= 4.8 && < 5, bytestring >= 0.9 && < 0.11, - containers >= 0.3 && < 0.6, + containers >= 0.3 && < 0.7, directory >= 1.2.3 && < 1.4, filepath >= 1.1 && < 1.5, file-embed >= 0.0.10 && < 0.1, @@ -75,7 +75,7 @@ Executable stylish-haskell aeson >= 0.6 && < 1.4, base >= 4.8 && < 5, bytestring >= 0.9 && < 0.11, - containers >= 0.3 && < 0.6, + containers >= 0.3 && < 0.7, directory >= 1.2.3 && < 1.4, filepath >= 1.1 && < 1.5, file-embed >= 0.0.10 && < 0.1, @@ -124,7 +124,7 @@ Test-suite stylish-haskell-tests aeson >= 0.6 && < 1.4, base >= 4.8 && < 5, bytestring >= 0.9 && < 0.11, - containers >= 0.3 && < 0.6, + containers >= 0.3 && < 0.7, directory >= 1.2.3 && < 1.4, filepath >= 1.1 && < 1.5, file-embed >= 0.0.10 && < 0.1, -- cgit v1.2.3 From 3da91c53431af1b43dda27316588502ab113f7ec Mon Sep 17 00:00:00 2001 From: Brandon Chinn Date: Wed, 2 Jan 2019 02:53:05 -0800 Subject: Update bounds to support >= lts-2.5 (#227) --- lib/Language/Haskell/Stylish/Config.hs | 7 ++++--- stack.yaml | 4 +--- stylish-haskell.cabal | 12 ++++++------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/Language/Haskell/Stylish/Config.hs b/lib/Language/Haskell/Stylish/Config.hs index 19588b7..ad30498 100644 --- a/lib/Language/Haskell/Stylish/Config.hs +++ b/lib/Language/Haskell/Stylish/Config.hs @@ -22,7 +22,8 @@ import Data.List (inits, import Data.Map (Map) import qualified Data.Map as M import Data.Maybe (fromMaybe) -import Data.Yaml (decodeEither) +import Data.Yaml (decodeEither', + prettyPrintParseException) import System.Directory import System.FilePath (joinPath, splitPath, @@ -103,9 +104,9 @@ loadConfig verbose userSpecified = do mbFp <- configFilePath verbose userSpecified verbose $ "Loading configuration at " ++ fromMaybe "" mbFp bytes <- maybe (return defaultConfigBytes) B.readFile mbFp - case decodeEither bytes of + case decodeEither' bytes of Left err -> error $ - "Language.Haskell.Stylish.Config.loadConfig: " ++ err + "Language.Haskell.Stylish.Config.loadConfig: " ++ prettyPrintParseException err Right config -> return config diff --git a/stack.yaml b/stack.yaml index ceda64e..e30ff6b 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,6 +1,4 @@ flags: {} packages: - '.' -resolver: lts-11.5 -extra-deps: -- 'aeson-1.3.1.0' +resolver: lts-13.0 diff --git a/stylish-haskell.cabal b/stylish-haskell.cabal index d811274..4305675 100644 --- a/stylish-haskell.cabal +++ b/stylish-haskell.cabal @@ -49,7 +49,7 @@ Library Paths_stylish_haskell Build-depends: - aeson >= 0.6 && < 1.4, + aeson >= 0.6 && < 1.5, base >= 4.8 && < 5, bytestring >= 0.9 && < 0.11, containers >= 0.3 && < 0.7, @@ -60,7 +60,7 @@ Library mtl >= 2.0 && < 2.3, semigroups >= 0.18 && < 0.19, syb >= 0.3 && < 0.8, - yaml >= 0.7 && < 0.10 + yaml >= 0.8.11 && < 0.12 Executable stylish-haskell Ghc-options: -Wall @@ -72,7 +72,7 @@ Executable stylish-haskell strict >= 0.3 && < 0.4, optparse-applicative >= 0.12 && < 0.15, -- Copied from regular dependencies... - aeson >= 0.6 && < 1.4, + aeson >= 0.6 && < 1.5, base >= 4.8 && < 5, bytestring >= 0.9 && < 0.11, containers >= 0.3 && < 0.7, @@ -82,7 +82,7 @@ Executable stylish-haskell haskell-src-exts >= 1.18 && < 1.21, mtl >= 2.0 && < 2.3, syb >= 0.3 && < 0.8, - yaml >= 0.7 && < 0.10 + yaml >= 0.8.11 && < 0.12 Test-suite stylish-haskell-tests Ghc-options: -Wall @@ -121,7 +121,7 @@ Test-suite stylish-haskell-tests test-framework >= 0.4 && < 0.9, test-framework-hunit >= 0.2 && < 0.4, -- Copied from regular dependencies... - aeson >= 0.6 && < 1.4, + aeson >= 0.6 && < 1.5, base >= 4.8 && < 5, bytestring >= 0.9 && < 0.11, containers >= 0.3 && < 0.7, @@ -131,7 +131,7 @@ Test-suite stylish-haskell-tests haskell-src-exts >= 1.18 && < 1.21, mtl >= 2.0 && < 2.3, syb >= 0.3 && < 0.8, - yaml >= 0.7 && < 0.10 + yaml >= 0.8.11 && < 0.12 Source-repository head Type: git -- cgit v1.2.3 From 75db9f48d699d866e19f408d057f486175127e4a Mon Sep 17 00:00:00 2001 From: Théophane Hufschmitt Date: Fri, 29 Jun 2018 17:00:13 +0200 Subject: README: Mention vim-autoformat A more generic and better-behaving plugin than `vim-stylish-haskell`, so worth mentioning as an alternative --- README.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.markdown b/README.markdown index ea23a47..7245f10 100644 --- a/README.markdown +++ b/README.markdown @@ -124,6 +124,16 @@ Or you can define `formatprg` and then use `gq`. +Alternatively, [vim-autoformat] supports stylish-haskell. To have it automatically reformat the files on save, add to your vimrc: + +```vim +autocmd BufWrite *.hs :Autoformat +" Don't automatically indent on save, since vim's autoindent for haskell is buggy +autocmd FileType haskell let b:autoformat_autoindent=0 +``` + +[vim-autoformat]: https://github.com/Chiel92/vim-autoformat + There is also the [vim-stylish-haskell] plugin, which runs stylish-haskell automatically when you save a Haskell file. -- cgit v1.2.3 From 6ad78322afd09c55198ee70cc7da610dc5979eb4 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 2 Jan 2019 12:47:05 +0100 Subject: Tweak CircleCI config --- .circleci/config.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3845c0e..e6a538c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,21 +17,15 @@ jobs: steps: - checkout - restore_cache: - key: 'v1-stylish-haskell-{{ arch }}-{{ .Branch }}' + key: 'v2-stylish-haskell-{{ arch }}-{{ .Branch }}' - run: - name: 'Update cabal indices' - command: 'cabal update' - - run: - name: 'Build and install' - command: 'cabal install --enable-tests --jobs=1' - - run: - name: 'Run tests' - command: 'cabal test' + name: 'Build, install and test' + command: 'stack build --test --copy-bins --jobs=1' - save_cache: - key: 'v1-stylish-haskell-{{ arch }}-{{ .Branch }}-{{ .Revision }}' + key: 'v2-stylish-haskell-{{ arch }}-{{ .Branch }}-{{ .Revision }}' paths: - - '~/.cabal' - - '~/.ghc' + - '~/.stack-work' + - '~/.stack' - run: name: 'Upload release' command: '.circleci/release.sh "$CIRCLE_TAG"' -- cgit v1.2.3 -- cgit v1.2.3 From dc526034228e8431731645fcb483386931cae199 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 2 Jan 2019 13:07:18 +0100 Subject: Bump version to 0.9.2.1 --- CHANGELOG | 5 +++++ stylish-haskell.cabal | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index fd128f3..d86dd23 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,10 @@ # CHANGELOG +- 0.9.2.1 (2019-01-02) + * Bump `aeson` to 1.4 + * Bump `yaml` to 0.11 + * Bump `containers` to 0.6 + - 0.9.2.0 (2018-05-01) * Support alignment of case expressions with a single guard * Add a new step to squash multiple spaces between some elements (by Martin diff --git a/stylish-haskell.cabal b/stylish-haskell.cabal index 4305675..a72698d 100644 --- a/stylish-haskell.cabal +++ b/stylish-haskell.cabal @@ -1,5 +1,5 @@ Name: stylish-haskell -Version: 0.9.2.0 +Version: 0.9.2.1 Synopsis: Haskell code prettifier Homepage: https://github.com/jaspervdj/stylish-haskell License: BSD3 -- cgit v1.2.3