1
1
mirror of https://github.com/nmattia/niv.git synced 2024-11-07 22:36:53 +03:00

Prettify specs.json

This commit is contained in:
Nicolas Mattia 2019-02-07 14:15:56 +01:00
parent 9887f05524
commit 8f03de5944
2 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import System.Exit (exitFailure)
import System.FilePath ((</>), takeDirectory)
import System.Process (readProcess)
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Encode.Pretty as AesonPretty
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import qualified Data.HashMap.Strict as HMap
@ -477,7 +478,7 @@ decodeFileStrict = fmap Aeson.decodeStrict . B.readFile
-- | Efficiently serialize a JSON value as a lazy 'L.ByteString' and write it to a file.
encodeFile :: (ToJSON a) => FilePath -> a -> IO ()
encodeFile fp = L.writeFile fp . Aeson.encode
encodeFile fp = L.writeFile fp . AesonPretty.encodePretty
--- HashMap

View File

@ -9,6 +9,7 @@ executable:
main: Main.hs
dependencies:
- aeson
- aeson-pretty
- directory
- string-qq
- filepath