diff options
author | OzoneGrif | 2020-02-08 04:29:45 +0100 |
---|---|---|
committer | GitHub | 2020-02-08 04:29:45 +0100 |
commit | 8facee21e8c60d14257afae13b69f30fb87e2b4b (patch) | |
tree | 4abda45c8ee93968b34d12256927ab84822abcd1 /compiler/src/Processors.hs | |
parent | e41b2bc587d058f996bf2ef41e8459d4f6eb7fff (diff) | |
parent | c22ea3de0fc5a42449b4bae80afa1a94c7afa41e (diff) | |
download | ldgallery-8facee21e8c60d14257afae13b69f30fb87e2b4b.tar.gz |
Merge pull request #89 from pacien/feature-check-distinct-in-out-dirs
Feature check distinct in out dirs
Diffstat (limited to 'compiler/src/Processors.hs')
-rw-r--r-- | compiler/src/Processors.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/Processors.hs b/compiler/src/Processors.hs index 6ab4eb5..faa2f43 100644 --- a/compiler/src/Processors.hs +++ b/compiler/src/Processors.hs | |||
@@ -25,6 +25,7 @@ module Processors | |||
25 | 25 | ||
26 | 26 | ||
27 | import Control.Exception (Exception, throwIO) | 27 | import Control.Exception (Exception, throwIO) |
28 | import Control.Monad (when) | ||
28 | import Data.Function ((&)) | 29 | import Data.Function ((&)) |
29 | import Data.Char (toLower) | 30 | import Data.Char (toLower) |
30 | import Data.List (break) | 31 | import Data.List (break) |
@@ -106,7 +107,7 @@ withCached :: Cache | |||
106 | withCached processor inputPath outputPath = | 107 | withCached processor inputPath outputPath = |
107 | do | 108 | do |
108 | isDir <- doesDirectoryExist outputPath | 109 | isDir <- doesDirectoryExist outputPath |
109 | if isDir then removePathForcibly outputPath else noop | 110 | when isDir $ removePathForcibly outputPath |
110 | 111 | ||
111 | fileExists <- doesFileExist outputPath | 112 | fileExists <- doesFileExist outputPath |
112 | if fileExists then | 113 | if fileExists then |
@@ -117,7 +118,6 @@ withCached processor inputPath outputPath = | |||
117 | update | 118 | update |
118 | 119 | ||
119 | where | 120 | where |
120 | noop = return () | ||
121 | update = processor inputPath outputPath | 121 | update = processor inputPath outputPath |
122 | skip = putStrLn $ "Skipping:\t" ++ outputPath | 122 | skip = putStrLn $ "Skipping:\t" ++ outputPath |
123 | 123 | ||