aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Compiler.hs
diff options
context:
space:
mode:
authorpacien2020-06-13 03:41:39 +0200
committerpacien2020-06-16 18:23:01 +0200
commitce2210e6deff1d981186b6d7ddb1176f27e41f49 (patch)
tree63d83660e733f16ef18d48debbc97c091c492c1f /compiler/src/Compiler.hs
parent34b90f08a21fbe3f1928e16a8ea48f1fc7453e4e (diff)
downloadldgallery-ce2210e6deff1d981186b6d7ddb1176f27e41f49.tar.gz
compiler: make GalleryIndex loadable from JSON
Diffstat (limited to 'compiler/src/Compiler.hs')
-rw-r--r--compiler/src/Compiler.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs
index 2bb27f9..5a7632d 100644
--- a/compiler/src/Compiler.hs
+++ b/compiler/src/Compiler.hs
@@ -29,7 +29,7 @@ import System.FilePath ((</>))
29import qualified System.FilePath.Glob as Glob 29import qualified System.FilePath.Glob as Glob
30import System.Directory (canonicalizePath) 30import System.Directory (canonicalizePath)
31 31
32import Data.Aeson (ToJSON) 32import Data.Aeson (ToJSON, FromJSON)
33import qualified Data.Aeson as JSON 33import qualified Data.Aeson as JSON
34 34
35import Config 35import Config
@@ -64,7 +64,7 @@ thumbnailsDir = "thumbnails"
64data GalleryIndex = GalleryIndex 64data GalleryIndex = GalleryIndex
65 { properties :: ViewerConfig 65 { properties :: ViewerConfig
66 , tree :: GalleryItem 66 , tree :: GalleryItem
67 } deriving (Generic, Show, ToJSON) 67 } deriving (Generic, Show, ToJSON, FromJSON)
68 68
69 69
70writeJSON :: ToJSON a => FileName -> a -> IO () 70writeJSON :: ToJSON a => FileName -> a -> IO ()