Bump fsnotify to 0.2

This commit is contained in:
Jasper Van der Jeugt 2015-08-01 10:14:21 +02:00
parent 7fedfd3585
commit df2bc9fa9e
3 changed files with 11 additions and 8 deletions

View File

@ -171,7 +171,7 @@ Library
Build-depends:
snap-core >= 0.6 && < 0.10,
snap-server >= 0.6 && < 0.10,
fsnotify >= 0.1 && < 0.2,
fsnotify >= 0.2 && < 0.3,
system-filepath >= 0.4.6 && <= 0.5
Cpp-options:
-DPREVIEW_SERVER
@ -181,7 +181,7 @@ Library
If flag(watchServer)
Build-depends:
fsnotify >= 0.1 && < 0.2,
fsnotify >= 0.2 && < 0.3,
system-filepath >= 0.4.6 && <= 0.5
Cpp-options:
-DWATCH_SERVER
@ -256,7 +256,7 @@ Test-suite hakyll-tests
Build-depends:
snap-core >= 0.6 && < 0.10,
snap-server >= 0.6 && < 0.10,
fsnotify >= 0.1 && < 0.2,
fsnotify >= 0.2 && < 0.3,
system-filepath >= 0.4.6 && <= 0.5
Cpp-options:
-DPREVIEW_SERVER
@ -266,7 +266,7 @@ Test-suite hakyll-tests
If flag(watchServer)
Build-depends:
fsnotify >= 0.1 && < 0.2,
fsnotify >= 0.2 && < 0.3,
system-filepath >= 0.4.6 && <= 0.5
Cpp-options:
-DWATCH_SERVER

View File

@ -12,7 +12,6 @@ import Control.Concurrent.MVar (newEmptyMVar, takeMVar,
import Control.Exception (AsyncException, fromException,
handle, throw)
import Control.Monad (forever, void, when)
import Filesystem.Path.CurrentOS (decodeString, encodeString)
import System.Directory (canonicalizePath)
import System.FilePath (pathSeparators)
import System.FSNotify (Event (..), startManager,
@ -41,7 +40,7 @@ import Hakyll.Core.Identifier.Pattern
-- a site as soon as any changes occur
watchUpdates :: Configuration -> IO Pattern -> IO ()
watchUpdates conf update = do
let providerDir = decodeString $ providerDirectory conf
let providerDir = providerDirectory conf
shouldBuild <- newEmptyMVar
pattern <- update
fullProviderDir <- canonicalizePath $ providerDirectory conf
@ -66,7 +65,7 @@ watchUpdates conf update = do
(\e -> case fromException e of
Nothing -> putStrLn (show e)
Just async -> throw (async :: AsyncException))
(update' event $ encodeString providerDir)
(update' event providerDir)
-- Send an event whenever something occurs so that the thread described
-- above will do a build.
@ -107,7 +106,7 @@ watchUpdates conf update = do
--------------------------------------------------------------------------------
eventPath :: Event -> FilePath
eventPath evt = encodeString $ evtPath evt
eventPath evt = evtPath evt
where
evtPath (Added p _) = p
evtPath (Modified p _) = p

View File

@ -4,6 +4,10 @@ title: Releases
# Releases
## Hakyll 4.7.2.1
- Bump fsnotify dependency to 0.2
## Hakyll 4.7.2.0
- Improve documentation of `getResourceXXX` functions (contribution by Matthias