From 436dad6d598e0d7e570acb6c952965d0166c0020 Mon Sep 17 00:00:00 2001 From: Matthew Danish Date: Thu, 29 Aug 2019 11:31:14 +0100 Subject: [PATCH] remove checkTimestamps from Main --- src/Main.hs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index e562a157..89f90364 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -213,25 +213,6 @@ expandDirs = fmap concat . mapM each then listFortranFiles path else pure [path] -data TimestampStatus = NoSuchFile | CompileFile | ModFileExists FilePath - --- | Compare the source file timestamp to the fsmod file timestamp, if --- it exists. -checkTimestamps :: FilePath -> IO TimestampStatus -checkTimestamps path = do - pathExists <- doesFileExist path - modExists <- doesFileExist $ path -<.> modFileSuffix - case (pathExists, modExists) of - (False, _) -> pure NoSuchFile - (True, False) -> pure CompileFile - (True, True) -> do - let modPath = path -<.> modFileSuffix - pathModTime <- getModificationTime path - modModTime <- getModificationTime modPath - if pathModTime < modModTime - then pure $ ModFileExists modPath - else pure CompileFile - -- | Get a list of Fortran files under the given directory. listFortranFiles :: FilePath -> IO [FilePath] listFortranFiles dir = filter isFortran <$> listDirectoryRecursively dir