diff options
Diffstat (limited to 'compiler/src')
-rw-r--r-- | compiler/src/Lib.hs | 8 |
1 files changed, 5 insertions, 3 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 () |