summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornclarke <>2018-08-10 10:57:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-08-10 10:57:00 (GMT)
commit89828122a1266d6afd1a81ca44d2506ba9b5a15b (patch)
tree85ec5f0503f936205ce0fef51a35b95708c6219d
parentb47b5352dddff63b5799121cc0c7c0dded834a1c (diff)
version 1.3.21.3.2
-rw-r--r--funflow.cabal4
-rw-r--r--src/Control/Funflow/ContentStore/Notify/Linux.hs11
-rw-r--r--src/Control/Funflow/External.hs3
-rw-r--r--src/Control/Funflow/External/Coordinator.hs3
-rw-r--r--test/Funflow/ContentStore.hs7
5 files changed, 22 insertions, 6 deletions
diff --git a/funflow.cabal b/funflow.cabal
index a5dd60c..c4a9581 100644
--- a/funflow.cabal
+++ b/funflow.cabal
@@ -1,5 +1,5 @@
Name: funflow
-Version: 1.3.1
+Version: 1.3.2
Synopsis: Workflows with arrows
Description:
An arrow with resumable computations and logging
@@ -94,7 +94,7 @@ Library
if os(linux)
CPP-options: -DOS_Linux
Other-modules: Control.Funflow.ContentStore.Notify.Linux
- Build-depends: hinotify == 0.3.9
+ Build-depends: hinotify >= 0.3.9
else
if os(darwin) || os(freebsd)
CPP-options: -DOS_BSD
diff --git a/src/Control/Funflow/ContentStore/Notify/Linux.hs b/src/Control/Funflow/ContentStore/Notify/Linux.hs
index 6411236..1d0bdf0 100644
--- a/src/Control/Funflow/ContentStore/Notify/Linux.hs
+++ b/src/Control/Funflow/ContentStore/Notify/Linux.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
@@ -14,6 +15,9 @@ module Control.Funflow.ContentStore.Notify.Linux
) where
import Control.Exception.Safe (catch)
+#if MIN_VERSION_hinotify(0,3,10)
+import qualified Data.ByteString.Char8 as BS
+#endif
import System.INotify
type Notifier = INotify
@@ -27,13 +31,18 @@ killNotifier = killINotify
type Watch = WatchDescriptor
addDirWatch :: Notifier -> FilePath -> IO () -> IO Watch
-addDirWatch inotify dir f = addWatch inotify mask dir $ \case
+addDirWatch inotify dir f = addWatch inotify mask dir' $ \case
Attributes True Nothing -> f
MovedSelf True -> f
DeletedSelf -> f
_ -> return ()
where
mask = [Attrib, MoveSelf, DeleteSelf, OnlyDir]
+#if MIN_VERSION_hinotify(0,3,10)
+ dir' = BS.pack dir
+#else
+ dir' = dir
+#endif
removeDirWatch :: Watch -> IO ()
removeDirWatch w =
diff --git a/src/Control/Funflow/External.hs b/src/Control/Funflow/External.hs
index f9834af..d4e4d4e 100644
--- a/src/Control/Funflow/External.hs
+++ b/src/Control/Funflow/External.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
@@ -13,7 +14,9 @@ import Control.Funflow.ContentHashable (ContentHash, ContentHashable,
import qualified Control.Funflow.ContentStore as CS
import Control.Lens.TH
import Data.Aeson (FromJSON, ToJSON)
+#if __GLASGOW_HASKELL__ < 804
import Data.Semigroup
+#endif
import Data.Store (Store)
import Data.String (IsString (..))
import qualified Data.Text as T
diff --git a/src/Control/Funflow/External/Coordinator.hs b/src/Control/Funflow/External/Coordinator.hs
index 5086e94..2771f94 100644
--- a/src/Control/Funflow/External/Coordinator.hs
+++ b/src/Control/Funflow/External/Coordinator.hs
@@ -1,4 +1,5 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
@@ -29,7 +30,9 @@ import Network.HostName
import Path
import System.Clock (TimeSpec)
+#if !MIN_VERSION_store(0,5,0)
instance Store TimeSpec
+#endif
-- | Information about an executor capable of running tasks. Currently this
-- is just a newtype wrapper around hostname.
diff --git a/test/Funflow/ContentStore.hs b/test/Funflow/ContentStore.hs
index 5bfa098..64b284e 100644
--- a/test/Funflow/ContentStore.hs
+++ b/test/Funflow/ContentStore.hs
@@ -1,7 +1,8 @@
-{-# LANGUAGE LambdaCase #-}
+{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
+{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE QuasiQuotes #-}
-{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE QuasiQuotes #-}
+{-# LANGUAGE TypeApplications #-}
module Funflow.ContentStore
( tests