diff options
author | pacien | 2019-12-25 22:56:16 +0100 |
---|---|---|
committer | pacien | 2019-12-25 22:56:16 +0100 |
commit | 45163fbc93b2bf2f7cb1fc3242ce5d3f51076601 (patch) | |
tree | 103f671ab1f342f4c7c4a19f389a9aaa175676cf | |
parent | 5b35285daa62fb9c10280fb43e340ba7b0746f5a (diff) | |
download | ldgallery-45163fbc93b2bf2f7cb1fc3242ce5d3f51076601.tar.gz |
cosmetic
-rw-r--r-- | compiler/src/Lib.hs | 8 | ||||
-rw-r--r-- | readme.md | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/compiler/src/Lib.hs b/compiler/src/Lib.hs index abdbeb7..2068b4a 100644 --- a/compiler/src/Lib.hs +++ b/compiler/src/Lib.hs | |||
@@ -28,7 +28,9 @@ import GHC.Generics (Generic) | |||
28 | import Data.Function ((&)) | 28 | import Data.Function ((&)) |
29 | import System.Directory (createDirectoryIfMissing) | 29 | import System.Directory (createDirectoryIfMissing) |
30 | import System.FilePath (dropFileName, (</>)) | 30 | import System.FilePath (dropFileName, (</>)) |
31 | import Data.Aeson (Object, ToJSON, FromJSON, encodeFile) | 31 | |
32 | import Data.Aeson (ToJSON, FromJSON) | ||
33 | import qualified Data.Aeson as JSON | ||
32 | 34 | ||
33 | import Files (FileName, readDirectory) | 35 | import Files (FileName, readDirectory) |
34 | import Input (decodeYamlFile, readInputTree) | 36 | import Input (decodeYamlFile, readInputTree) |
@@ -42,7 +44,7 @@ data CompilerConfig = CompilerConfig | |||
42 | 44 | ||
43 | data GalleryConfig = GalleryConfig | 45 | data GalleryConfig = GalleryConfig |
44 | { compiler :: CompilerConfig | 46 | { compiler :: CompilerConfig |
45 | , viewer :: Data.Aeson.Object | 47 | , viewer :: JSON.Object |
46 | } deriving (Generic, FromJSON, Show) | 48 | } deriving (Generic, FromJSON, Show) |
47 | 49 | ||
48 | readConfig :: FileName -> IO GalleryConfig | 50 | readConfig :: FileName -> IO GalleryConfig |
@@ -92,7 +94,7 @@ process inputDirPath outputDirPath = | |||
92 | writeJSON :: ToJSON a => FileName -> a -> IO () | 94 | writeJSON :: ToJSON a => FileName -> a -> IO () |
93 | writeJSON path obj = | 95 | writeJSON path obj = |
94 | createDirectoryIfMissing True (dropFileName path) | 96 | createDirectoryIfMissing True (dropFileName path) |
95 | >> encodeFile path obj | 97 | >> JSON.encodeFile path obj |
96 | 98 | ||
97 | 99 | ||
98 | testRun :: IO () | 100 | testRun :: IO () |
@@ -17,4 +17,4 @@ License | |||
17 | 17 | ||
18 | Copyright (C) 2019 Pacien TRAN-GIRARD and Guillaume FOUET. | 18 | Copyright (C) 2019 Pacien TRAN-GIRARD and Guillaume FOUET. |
19 | 19 | ||
20 | _ldgallery_ id distributed under the terms of the GNU Affero General Public License v3.0, as detailed in `license.md`. | 20 | _ldgallery_ is distributed under the terms of the GNU Affero General Public License v3.0, as detailed in `license.md`. |