From ab4d6540ca5fbc4d004e7483e24236823df57e26 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 23 Nov 2016 15:59:58 +0200 Subject: [PATCH] Workaround for compatibility with older fsnotify --- yesod-bin/Devel.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yesod-bin/Devel.hs b/yesod-bin/Devel.hs index 402b6e69..5c864a41 100644 --- a/yesod-bin/Devel.hs +++ b/yesod-bin/Devel.hs @@ -22,6 +22,7 @@ import Data.FileEmbed (embedFile) import qualified Data.Map as Map import Data.Streaming.Network (bindPortTCP, bindRandomPortTCP) +import Data.String (fromString) import Data.Time (getCurrentTime) import qualified Distribution.Package as D import qualified Distribution.PackageDescription as D @@ -313,8 +314,10 @@ devel opts passThroughArgs = do -- Start watching the signal file, and set changedVar to -- True each time it's changed. void $ watchDir manager - (takeDirectory develSignalFile') - (\e -> eventPath e == develSignalFile') + -- Using fromString to work with older versions of fsnotify + -- that use system-filepath + (fromString (takeDirectory develSignalFile')) + (\e -> eventPath e == fromString develSignalFile') (const $ atomically $ writeTVar changedVar True) -- Alright, watching is set up, let the build thread know