on master help sign in
Remove redundant liftIO
499fda5Ranjeet Kumar Ranjan
src/Streamly/Internal/FileSystem/Event/Darwin.hs+2−3
@@ -162,7 +162,6 @@ where
162
162
163import Control.Concurrent (MVar, newMVar, takeMVar, putMVar)
163import Control.Concurrent (MVar, newMVar, takeMVar, putMVar)
164import Control.Monad (when)
164import Control.Monad (when)
165−import Control.Monad.IO.Class (liftIO)
166import Data.Bits ((.|.), (.&.), complement)
165import Data.Bits ((.|.), (.&.), complement)
167import Data.Functor.Identity (runIdentity)
166import Data.Functor.Identity (runIdentity)
168import Data.List.NonEmpty (NonEmpty)
167import Data.List.NonEmpty (NonEmpty)
@@ -565,8 +564,8 @@ watchWith f paths = S.bracketIO before after watchToStream
565
564
566 where
565 where
567
566
568− before = liftIO $ openWatch (f defaultConfig) paths
567+ before = openWatch (f defaultConfig) paths
569− after = liftIO . closeWatch
568+ after = closeWatch
570
569
571-- | Same as 'watchWith' using 'defaultConfig' and recursive mode.
570-- | Same as 'watchWith' using 'defaultConfig' and recursive mode.
572--
571--
src/Streamly/Internal/FileSystem/Event/Linux.hs+3−3
@@ -151,7 +151,7 @@ module Streamly.Internal.FileSystem.Event.Linux
151where
151where
152
152
153import Control.Monad (void, when)
153import Control.Monad (void, when)
154−import Control.Monad.IO.Class (MonadIO, liftIO)
154+import Control.Monad.IO.Class (MonadIO)
155import Data.Bits ((.|.), (.&.), complement)
155import Data.Bits ((.|.), (.&.), complement)
156import Data.Char (ord)
156import Data.Char (ord)
157import Data.Foldable (foldlM)
157import Data.Foldable (foldlM)
@@ -912,8 +912,8 @@ watchWith f paths = S.bracketIO before after (watchToStream cfg)
912 where
912 where
913
913
914 cfg = f defaultConfig
914 cfg = f defaultConfig
915− before = liftIO $ openWatch cfg paths
915+ before = openWatch cfg paths
916− after = liftIO . closeWatch
916+ after = closeWatch
917
917
918-- | Same as 'watchWith' using 'defaultConfig' and recursive mode.
918-- | Same as 'watchWith' using 'defaultConfig' and recursive mode.
919--
919--