on master help sign in
Remove redundant liftIO
commit499fda53a393a90dd12faea2d72a184d3893058e authorRanjeet Kumar Ranjan <ranjeetr@composewell.com> dateMon 5 Dec 2022, 15:45 (4 years ago) parent10b1ac1
2 files changed+5−6
src/Streamly/Internal/FileSystem/Event/Darwin.hs+2−3 src/Streamly/Internal/FileSystem/Event/Linux.hs+3−3
src/Streamly/Internal/FileSystem/Event/Darwin.hs+2−3
@@ -162,7 +162,6 @@ where
162162
163163import Control.Concurrent (MVar, newMVar, takeMVar, putMVar)
164164import Control.Monad (when)
165−import Control.Monad.IO.Class (liftIO)
166165import Data.Bits ((.|.), (.&.), complement)
167166import Data.Functor.Identity (runIdentity)
168167import Data.List.NonEmpty (NonEmpty)
@@ -565,8 +564,8 @@ watchWith f paths = S.bracketIO before after watchToStream
565564
566565 where
567566
568− before = liftIO $ openWatch (f defaultConfig) paths
569− after = liftIO . closeWatch
567+ before = openWatch (f defaultConfig) paths
568+ after = closeWatch
570569
571570-- | Same as 'watchWith' using 'defaultConfig' and recursive mode.
572571--
src/Streamly/Internal/FileSystem/Event/Linux.hs+3−3
@@ -151,7 +151,7 @@ module Streamly.Internal.FileSystem.Event.Linux
151151where
152152
153153import Control.Monad (void, when)
154−import Control.Monad.IO.Class (MonadIO, liftIO)
154+import Control.Monad.IO.Class (MonadIO)
155155import Data.Bits ((.|.), (.&.), complement)
156156import Data.Char (ord)
157157import Data.Foldable (foldlM)
@@ -912,8 +912,8 @@ watchWith f paths = S.bracketIO before after (watchToStream cfg)
912912 where
913913
914914 cfg = f defaultConfig
915− before = liftIO $ openWatch cfg paths
916− after = liftIO . closeWatch
915+ before = openWatch cfg paths
916+ after = closeWatch
917917
918918-- | Same as 'watchWith' using 'defaultConfig' and recursive mode.
919919--