diff options
| author | hallgren <hallgren@chalmers.se> | 2014-09-08 15:43:20 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-09-08 15:43:20 +0000 |
| commit | 4eb6b55e980fda9c4d260820f5a6d38dde3d0991 (patch) | |
| tree | c771181c860137fb7a5bec7eaf3f899292b00aae /src/compiler/GF/System | |
| parent | 4d28c7632e83aed413c22001ec0821971f58f14d (diff) | |
(1) Refactor concurrency, (2) write to .gfo.tmp then rename to .gfo
(1) introduces the module GF.Infra.Concurreny with lifted concurrency
operators (to reduce uses of liftIO) and some additional concurrency
utilities, e.g. a function for sequential logging that is used in
both GF.CompileInParallel and GFServer.
(2) avoids leaving broken .gfo files behind if compilation is aborted.
Diffstat (limited to 'src/compiler/GF/System')
| -rw-r--r-- | src/compiler/GF/System/Directory.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/GF/System/Directory.hs b/src/compiler/GF/System/Directory.hs index 306c5fbcb..898646063 100644 --- a/src/compiler/GF/System/Directory.hs +++ b/src/compiler/GF/System/Directory.hs @@ -7,7 +7,7 @@ import System.Directory as D hiding (canonicalizePath,createDirectoryIfMissing, doesDirectoryExist,doesFileExist,getModificationTime, getCurrentDirectory,getDirectoryContents,getPermissions, - removeFile) + removeFile,renameFile) import Data.Time.Compat canonicalizePath path = liftIO $ D.canonicalizePath path @@ -21,4 +21,5 @@ getCurrentDirectory :: MonadIO io => io FilePath getCurrentDirectory = liftIO D.getCurrentDirectory getPermissions path = liftIO $ D.getPermissions path -removeFile path = liftIO $ D.removeFile path
\ No newline at end of file +removeFile path = liftIO $ D.removeFile path +renameFile path = liftIO . D.renameFile path |
