fswatch 0.1.0.2 → 0.1.0.3
raw patch · 5 files changed
+20/−21 lines, 5 filesdep ~basedep ~process
Dependency ranges changed: base, process
Files
- fswatch.cabal +8/−5
- src/Main.hs +0/−1
- src/System/FSWatch.hs +5/−7
- src/System/FSWatch/Repr.hs +4/−5
- src/System/FSWatch/Slave.hs +3/−3
fswatch.cabal view
@@ -1,6 +1,6 @@ name: fswatch -version: 0.1.0.2 +version: 0.1.0.3 synopsis: File System watching tool with cli and slave functionalities. description: File System watching tool with cli and slave lib (with os process) functionalities. category: Filesystem @@ -17,25 +17,28 @@ exposed-modules: System.FSWatch , System.FSWatch.Repr , System.FSWatch.Slave - build-depends: base >=4.10 && <4.11 + build-depends: base >=4.9 && <4.12 , haskeline >=0.7 && <0.8 , directory >=1.3.0 , fsnotify >=0.2.1 , optparse-applicative >= 0.13.2 - , process >=1.6 + , process >=1.4 hs-source-dirs: src default-language: Haskell2010 executable hfswatch ghc-options: -threaded main-is: Main.hs + other-modules: System.FSWatch + , System.FSWatch.Repr + , System.FSWatch.Slave other-extensions: ViewPatterns, RecordWildCards - build-depends: base >=4.10 && <4.11 + build-depends: base >=4.9 && <4.12 , haskeline >=0.7 && <0.8 , directory >=1.3.0 , fsnotify >=0.2.1 , optparse-applicative >= 0.13.2 - , process >=1.4.3 + , process >=1.4 , fswatch hs-source-dirs: src default-language: Haskell2010
src/Main.hs view
@@ -6,4 +6,3 @@ main :: IO () main = watchMain -
src/System/FSWatch.hs view
@@ -8,14 +8,14 @@ import Data.List import Data.Semigroup ((<>)) -import Control.Monad -import Control.Monad.IO.Class import Control.Concurrent +import Control.Monad +import Control.Monad.IO.Class (MonadIO(..)) import Options.Applicative hiding (defaultPrefs) import System.Console.Haskeline -import System.Console.Haskeline.History -import System.Directory +import System.Console.Haskeline.History (historyLines) +import System.Directory (canonicalizePath) import System.FSNotify import System.IO @@ -168,7 +168,7 @@ event2PE (Removed str _) = Rem str stop :: P -> String -> DB -> InputT IO () -stop p fn [] = printP p "no whatching this" +stop p _ [] = printP p "no whatching this" stop p fn (DBE{..}:dbo) = if wfn /= fn then stop p fn dbo else liftIO (stopManager wman) startPrinter :: State -> MVar PrintFormat -> Chan PE -> IO (IO ()) @@ -177,8 +177,6 @@ noBufferClock <- newEmptyMVar fixBufferClock <- newEmptyMVar delayedBufferClock <- newEmptyMVar - bf <- readMVar buffering - lastBufferMode <- newMVar bf t1 <- forkIO $ void $ forever $ do e <- readChan ch
src/System/FSWatch/Repr.hs view
@@ -1,12 +1,11 @@ module System.FSWatch.Repr where -import Control.Concurrent - -import System.FSNotify -import System.IO -import System.Process +import Control.Concurrent (MVar, Chan) +import System.FSNotify (WatchManager) +import System.IO (IO, Handle) +import System.Process (ProcessHandle) data WatchProcess = WatchProcess { wPath :: String
src/System/FSWatch/Slave.hs view
@@ -13,14 +13,14 @@ , waitNotifies ) where -import Control.Monad -import Control.Monad.IO.Class import Control.Concurrent +import Control.Monad +import Control.Monad.IO.Class (MonadIO(..)) import System.IO import System.Process -import System.FSWatch.Repr +import System.FSWatch.Repr (PE, Listener, WatchProcess(..)) createWatchProcess :: (MonadIO m) => String -> Int -> m WatchProcess