summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMoritz Drexl <mdrexl@fastmail.fm>2017-01-21 10:08:30 +0100
committerMoritz Drexl <mdrexl@fastmail.fm>2017-01-21 10:08:30 +0100
commit49dedad84701d7c0af13edb2e49284373e4e5760 (patch)
tree5b0d846bb4550e34de306e5937b179b92900a70f
parent8c27fc3298bcb7f11e0dd5df498efd3ba83e6d87 (diff)
parentc5f4b981309476be8b3e591584d18d3309511e00 (diff)
downloadstylish-haskell-49dedad84701d7c0af13edb2e49284373e4e5760.tar.gz
Merge remote-tracking branch 'upstream/master' into fix/keep-safe-and-source
-rw-r--r--.travis.yml5
-rw-r--r--README.markdown2
-rw-r--r--src/Main.hs5
-rw-r--r--stack.yaml2
4 files changed, 8 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index eeb0184..5e5c816 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,13 +7,10 @@ cache:
addons:
apt:
- sources:
- - hvr-ghc
packages:
- - ghc-7.10.3
+ - libgmp-dev
before_install:
-- export PATH=/opt/ghc/7.10.3/bin:$PATH
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
diff --git a/README.markdown b/README.markdown
index 3cee691..b7a3838 100644
--- a/README.markdown
+++ b/README.markdown
@@ -15,7 +15,7 @@ This tool tries to help where necessary without getting in the way.
Installation
------------
-You can install it using `cabal install stylish-haskell`.
+You can install it using `stack install stylish-haskell` or `cabal install stylish-haskell`.
You can also install it using your package manager:
* Debian 9 or later: `apt-get install stylish-haskell`
diff --git a/src/Main.hs b/src/Main.hs
index d481517..8eeb7ab 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -10,6 +10,7 @@ import Data.Monoid ((<>))
import Data.Version (showVersion)
import qualified Options.Applicative as OA
import qualified Paths_stylish_haskell
+import System.Exit (exitFailure)
import qualified System.IO as IO
import qualified System.IO.Strict as IO.Strict
@@ -117,8 +118,10 @@ file sa conf mfp = do
let result = runSteps (configLanguageExtensions conf)
mfp (configSteps conf) $ lines contents
case result of
- Left err -> IO.hPutStrLn IO.stderr err >> write contents contents
Right ok -> write contents $ unlines ok
+ Left err -> do
+ IO.hPutStrLn IO.stderr err
+ exitFailure
where
write old new = case mfp of
Nothing -> putStrNewline new
diff --git a/stack.yaml b/stack.yaml
index f98dcf8..8f26efa 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -5,3 +5,5 @@ extra-deps:
- 'haskell-src-exts-1.18.2'
- 'optparse-applicative-0.13.0.0'
resolver: lts-6.10
+install-ghc: true
+system-ghc: false