aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Input.hs
diff options
context:
space:
mode:
authorpacien2020-01-06 10:28:27 +0100
committerpacien2020-01-06 10:28:27 +0100
commit03d39102ba55cda7cbe80fcdeb9b250caaa70bd0 (patch)
tree679a36e4b5eaa9c49bb62b715772d96bd9a26aaa /compiler/src/Input.hs
parent5f57fd4f21f7ecd4038ca6e66a4b89622cbcc9fc (diff)
downloadldgallery-03d39102ba55cda7cbe80fcdeb9b250caaa70bd0.tar.gz
compiler: properly reject invalid dates in sidecar files
GitHub: closes #31
Diffstat (limited to 'compiler/src/Input.hs')
-rw-r--r--compiler/src/Input.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/src/Input.hs b/compiler/src/Input.hs
index 86d3ec8..85c802e 100644
--- a/compiler/src/Input.hs
+++ b/compiler/src/Input.hs
@@ -30,6 +30,7 @@ import Data.Function ((&))
30import Data.Maybe (catMaybes) 30import Data.Maybe (catMaybes)
31import Data.Bool (bool) 31import Data.Bool (bool)
32import Data.List (find) 32import Data.List (find)
33import Data.Time.LocalTime (ZonedTime)
33import Data.Yaml (ParseException, decodeFileEither) 34import Data.Yaml (ParseException, decodeFileEither)
34import Data.Aeson (FromJSON) 35import Data.Aeson (FromJSON)
35import System.FilePath (isExtensionOf, dropExtension) 36import System.FilePath (isExtensionOf, dropExtension)
@@ -60,7 +61,7 @@ data InputTree =
60 61
61data Sidecar = Sidecar 62data Sidecar = Sidecar
62 { title :: Maybe String 63 { title :: Maybe String
63 , date :: Maybe String 64 , date :: Maybe ZonedTime
64 , description :: Maybe String 65 , description :: Maybe String
65 , tags :: Maybe [String] 66 , tags :: Maybe [String]
66 } deriving (Generic, FromJSON, Show) 67 } deriving (Generic, FromJSON, Show)