diff options
| author | Sergei Trofimovich <slyfox@community.haskell.org> | 2013-03-09 21:38:43 +0000 |
|---|---|---|
| committer | Sergei Trofimovich <slyfox@community.haskell.org> | 2013-03-09 21:38:43 +0000 |
| commit | 0173b5f4ff1bb1aa07b15c441533a309036c8864 (patch) | |
| tree | 603afbd7e0400fe813bf223341f8e2c9f5a5b0e1 /src/compiler/GFServer.hs | |
| parent | 576b19aab5ff16b44c70e5b1d77bc65190dac056 (diff) | |
ghc-7.6: allow directory-1.2
Get rid of old-time depend (and ClockTime in favour of UTCTime).
time-compat helps to retain backward compatibility with directory-1.1
and lower.
Diffstat (limited to 'src/compiler/GFServer.hs')
| -rw-r--r-- | src/compiler/GFServer.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GFServer.hs b/src/compiler/GFServer.hs index 7442f6420..98bb3b74e 100644 --- a/src/compiler/GFServer.hs +++ b/src/compiler/GFServer.hs @@ -14,7 +14,8 @@ import System.Directory(doesDirectoryExist,doesFileExist,createDirectory, setCurrentDirectory,getCurrentDirectory, getDirectoryContents,removeFile,removeDirectory, getModificationTime) -import System.Time(toUTCTime,formatCalendarTime) +import Data.Time.Compat (toUTCTime) +import Data.Time (formatTime) import System.Locale(defaultTimeLocale,rfc822DateFormat) import System.FilePath(dropExtension,takeExtension,takeFileName,takeDirectory, (</>)) @@ -249,8 +250,7 @@ handle documentroot state0 cache execute1 do t <- liftIO $ getModificationTime path return $ makeObj ["path".=path,"time".=format t] where - format = formatCalendarTime defaultTimeLocale rfc822DateFormat - . toUTCTime + format = formatTime defaultTimeLocale rfc822DateFormat rm path | takeExtension path `elem` ok_to_delete = do b <- liftIO $ doesFileExist path |
