proteome 0.3.8.0 → 0.3.9.0
raw patch · 2 files changed
+9/−6 lines, 2 files
Files
- lib/Proteome/PersistBuffers.hs +7/−4
- proteome.cabal +2/−2
lib/Proteome/PersistBuffers.hs view
@@ -46,9 +46,8 @@ Project (DirProject (ProjectName name) _ (Just (ProjectType tpe))) _ _ _ -> Just $ tpe </> name _ -> Nothing --- TODO lock process in state to avoid multiple processes trying to access the file-storeBuffers' :: FilePath -> Proteome ()-storeBuffers' path = do+unsafeStoreBuffers :: FilePath -> Proteome ()+unsafeStoreBuffers path = do active <- vim_get_current_buffer' activeName <- buffer_get_name' active activeIsFile <- liftIO $ doesFileExist activeName@@ -57,6 +56,10 @@ files <- liftIO $ filterM doesFileExist all' persistStore (path </> "buffers") (PersistBuffers current' files) +safeStoreBuffers :: FilePath -> Proteome ()+safeStoreBuffers path =+ lockOrSkip "store-buffers" $ unsafeStoreBuffers path+ decodePersistBuffers :: FilePath -> Proteome (Either String PersistBuffers) decodePersistBuffers path = runExceptT $ persistLoad (path </> "buffers") @@ -78,7 +81,7 @@ storeBuffers :: Proteome () storeBuffers = do sub <- projectSubPath- mapM_ storeBuffers' sub+ mapM_ safeStoreBuffers sub loadBuffers :: Proteome () loadBuffers = do
proteome.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 4a4fe5d2c7d0d545c6bd569a39b33f33bda07bc0c6c5e88da960f4fdda134ea6+-- hash: 68f91b72a046fbccc15d92486eab9379d3a2f0e0526b5c2a5029ea5df16cc43d name: proteome-version: 0.3.8.0+version: 0.3.9.0 synopsis: neovim project manager description: Please see the README on GitHub at <https://github.com/tek/proteome-hs> category: Neovim