aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/src/Lib.hs8
-rw-r--r--readme.md2
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)
28import Data.Function ((&)) 28import Data.Function ((&))
29import System.Directory (createDirectoryIfMissing) 29import System.Directory (createDirectoryIfMissing)
30import System.FilePath (dropFileName, (</>)) 30import System.FilePath (dropFileName, (</>))
31import Data.Aeson (Object, ToJSON, FromJSON, encodeFile) 31
32import Data.Aeson (ToJSON, FromJSON)
33import qualified Data.Aeson as JSON
32 34
33import Files (FileName, readDirectory) 35import Files (FileName, readDirectory)
34import Input (decodeYamlFile, readInputTree) 36import Input (decodeYamlFile, readInputTree)
@@ -42,7 +44,7 @@ data CompilerConfig = CompilerConfig
42 44
43data GalleryConfig = GalleryConfig 45data 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
48readConfig :: FileName -> IO GalleryConfig 50readConfig :: 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
98testRun :: IO () 100testRun :: IO ()
diff --git a/readme.md b/readme.md
index 94685b8..7bfcbc0 100644
--- a/readme.md
+++ b/readme.md
@@ -17,4 +17,4 @@ License
17 17
18Copyright (C) 2019 Pacien TRAN-GIRARD and Guillaume FOUET. 18Copyright (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`.