polysemy-process 0.5.1.0 → 0.5.1.1
raw patch · 2 files changed
+11/−6 lines, 2 filesdep −string-interpolate
Dependencies removed: string-interpolate
Files
lib/Polysemy/Process/Interpreter/ProcessIOE.hs view
@@ -1,4 +1,6 @@ {-# options_haddock prune #-}+{-# language CPP #-}+ -- |Description: Process Interpreters for stdpipes, Internal module Polysemy.Process.Interpreter.ProcessIOE where @@ -33,6 +35,10 @@ import Polysemy.Process.Effect.Process (Process) import Polysemy.Process.Interpreter.Process (interpretProcessNative) +#if !MIN_VERSION_relude(1,0,0)+import System.IO (BufferMode (NoBuffering), hSetBuffering)+#endif+ newtype In a = In { unIn :: a } deriving (Eq, Show)@@ -63,10 +69,10 @@ Handle -> Sem r () readQueue discardWhenFull handle = do- embed @IO (hSetBuffering handle NoBuffering)+ void $ tryAny (hSetBuffering handle NoBuffering) tryAny (hGetSome handle 4096) >>= traverse_ \ msg -> do- if discardWhenFull then void (Queue.tryWrite (In msg)) else Queue.write (In msg)- readQueue discardWhenFull handle+ if discardWhenFull then void (Queue.tryWrite (In msg)) else Queue.write (In msg)+ readQueue discardWhenFull handle writeQueue :: ∀ r .@@ -74,7 +80,7 @@ Handle -> Sem r () writeQueue handle = do- embed @IO (hSetBuffering handle NoBuffering)+ void $ tryAny (hSetBuffering handle NoBuffering) spin where spin =
polysemy-process.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: polysemy-process-version: 0.5.1.0+version: 0.5.1.1 synopsis: Polysemy Effects for System Processes description: See <https://hackage.haskell.org/package/polysemy-process/docs/Polysemy-Process.html> category: Concurrency@@ -109,7 +109,6 @@ , relude >=0.7 , stm , stm-chans >=2- , string-interpolate >=0.2 , template-haskell , text , time