diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2017-12-26 14:25:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 14:25:59 +0100 |
commit | 02c93a9c34ff9bed0b536f5f7a92c6f802d54480 (patch) | |
tree | 76432cbd4e90c8f7601db067132b3fb3da2000fb /src | |
parent | 336220ca9f3e1ab9091651d60a9491386f77b7ed (diff) | |
download | stylish-haskell-02c93a9c34ff9bed0b536f5f7a92c6f802d54480.tar.gz |
Use file-embed for default configuration
Diffstat (limited to 'src')
-rw-r--r-- | src/Main.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Main.hs b/src/Main.hs index 8eeb7ab..e71c795 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -6,10 +6,10 @@ module Main -------------------------------------------------------------------------------- import Control.Monad (forM_, unless) +import qualified Data.ByteString.Char8 as BC8 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 @@ -70,7 +70,7 @@ parseStylishArgs = StylishArgs -------------------------------------------------------------------------------- stylishHaskellVersion :: String -stylishHaskellVersion = "stylish-haskell " <> showVersion Paths_stylish_haskell.version +stylishHaskellVersion = "stylish-haskell " <> showVersion version -------------------------------------------------------------------------------- @@ -94,9 +94,8 @@ stylishHaskell sa = do putStrLn stylishHaskellVersion else if saDefaults sa then do - fileName <- defaultConfigFilePath - verbose' $ "Dumping config from " ++ fileName - readUTF8File fileName >>= putStr + verbose' "Dumping embedded config..." + BC8.putStr defaultConfigBytes else do conf <- loadConfig verbose' (saConfig sa) |