From d0962ef2dea7e8a0c25ca8fdbc55fcbafeeb2f79 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 30 Dec 2019 23:18:49 +0100 Subject: compiler: refactor resource transformation pipeline --- compiler/src/Processors.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'compiler/src/Processors.hs') diff --git a/compiler/src/Processors.hs b/compiler/src/Processors.hs index ded3cc5..df05c24 100644 --- a/compiler/src/Processors.hs +++ b/compiler/src/Processors.hs @@ -37,9 +37,6 @@ import Data.Function ((&)) import Data.Ratio ((%)) import Data.Char (toLower) -import GHC.Generics (Generic) -import Data.Aeson (FromJSON) - import System.Directory hiding (copyFile) import qualified System.Directory import System.FilePath @@ -60,7 +57,7 @@ data Format = | Other formatFromPath :: Path -> Format -formatFromPath = aux . (map toLower) . fileName +formatFromPath = aux . (map toLower) . takeExtension . fileName where aux ".bmp" = Bmp aux ".jpg" = Jpg @@ -71,9 +68,6 @@ formatFromPath = aux . (map toLower) . fileName aux ".gif" = Gif aux _ = Other -data Resolution = Resolution - { width :: Int - , height :: Int } deriving (Show, Generic, FromJSON) type FileProcessor = FileName -- ^ Input path -- cgit v1.2.3