From 00c6216259d8a7b131307953ba5000d2b5dc564b Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 13 Jun 2020 00:06:18 +0200 Subject: compiler: trivial code simplifications Following HLint's advice. --- compiler/src/Config.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/src/Config.hs') diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs index 0ae0fa1..3c38a17 100644 --- a/compiler/src/Config.hs +++ b/compiler/src/Config.hs @@ -73,8 +73,8 @@ instance FromJSON GalleryConfig where <*> v .:? "includedTags" .!= ["*"] <*> v .:? "excludedTags" .!= [] <*> v .:? "tagCategories" .!= [] - <*> v .:? "tagsFromDirectories" .!= (TagsFromDirectoriesConfig 0 "") - <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 300) + <*> v .:? "tagsFromDirectories" .!= TagsFromDirectoriesConfig 0 "" + <*> v .:? "thumbnailMaxResolution" .!= Resolution 400 300 <*> v .:? "pictureMaxResolution" readConfig :: FileName -> IO GalleryConfig -- cgit v1.2.3 From ce2210e6deff1d981186b6d7ddb1176f27e41f49 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 13 Jun 2020 03:41:39 +0200 Subject: compiler: make GalleryIndex loadable from JSON --- compiler/src/Config.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/Config.hs') diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs index 3c38a17..afcfb36 100644 --- a/compiler/src/Config.hs +++ b/compiler/src/Config.hs @@ -84,7 +84,7 @@ readConfig = decodeYamlFile data ViewerConfig = ViewerConfig { galleryTitle :: String , tagCategories :: [String] - } deriving (Generic, ToJSON, Show) + } deriving (Generic, ToJSON, FromJSON, Show) viewerConfig :: GalleryConfig -> ViewerConfig viewerConfig GalleryConfig{galleryTitle, tagCategories} = ViewerConfig galleryTitle tagCategories -- cgit v1.2.3