From 63b06627f200f155f66ecdb6c5f41ab44808dd6b Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 27 Dec 2019 12:38:01 +0100 Subject: compiler: add compiler config keys --- compiler/src/Processors.hs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'compiler/src/Processors.hs') diff --git a/compiler/src/Processors.hs b/compiler/src/Processors.hs index aaa178f..c097db7 100644 --- a/compiler/src/Processors.hs +++ b/compiler/src/Processors.hs @@ -36,6 +36,9 @@ import Control.Exception (throwIO) import Data.Function ((&)) import Data.Ratio ((%)) +import GHC.Generics (Generic) +import Data.Aeson (FromJSON) + import System.Directory hiding (copyFile) import qualified System.Directory import System.FilePath @@ -64,7 +67,7 @@ formatFromExt _ = Other data Resolution = Resolution { width :: Int - , height :: Int } deriving Show + , height :: Int } deriving (Show, Generic, FromJSON) type FileProcessor = FileName -- ^ Input path @@ -144,13 +147,6 @@ withCached processor inputPath outputPath = update = processor inputPath outputPath skip = putStrLn $ "Skipping:\t" ++ outputPath - isOutdated :: FilePath -> FilePath -> IO Bool - isOutdated ref target = - do - refTime <- getModificationTime ref - targetTime <- getModificationTime target - return (targetTime < refTime) - type DirFileProcessor = FileName -- ^ Input base path -- cgit v1.2.3