fix build w/o concurrent-output
This commit is contained in:
parent
7d4b4a77b1
commit
6021538332
2 changed files with 3 additions and 3 deletions
|
@ -11,10 +11,10 @@
|
||||||
module Messages.Concurrent where
|
module Messages.Concurrent where
|
||||||
|
|
||||||
import Annex
|
import Annex
|
||||||
|
import Types.Messages
|
||||||
|
|
||||||
#ifdef WITH_CONCURRENTOUTPUT
|
#ifdef WITH_CONCURRENTOUTPUT
|
||||||
import Common
|
import Common
|
||||||
import Types.Messages
|
|
||||||
import qualified System.Console.Concurrent as Console
|
import qualified System.Console.Concurrent as Console
|
||||||
import qualified System.Console.Regions as Regions
|
import qualified System.Console.Regions as Regions
|
||||||
import Control.Concurrent.STM
|
import Control.Concurrent.STM
|
||||||
|
@ -32,8 +32,8 @@ import GHC.IO.Encoding
|
||||||
- instead.
|
- instead.
|
||||||
-}
|
-}
|
||||||
concurrentMessage :: OutputType -> Bool -> String -> Annex () -> Annex ()
|
concurrentMessage :: OutputType -> Bool -> String -> Annex () -> Annex ()
|
||||||
#ifdef WITH_CONCURRENTOUTPUT
|
|
||||||
concurrentMessage o iserror msg fallback
|
concurrentMessage o iserror msg fallback
|
||||||
|
#ifdef WITH_CONCURRENTOUTPUT
|
||||||
| concurrentOutputEnabled o =
|
| concurrentOutputEnabled o =
|
||||||
go =<< consoleRegion <$> Annex.getState Annex.output
|
go =<< consoleRegion <$> Annex.getState Annex.output
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,8 +45,8 @@ metered combinemeterupdate key a = case keySize key of
|
||||||
maybe noop (\m -> m n) combinemeterupdate
|
maybe noop (\m -> m n) combinemeterupdate
|
||||||
liftIO $ clearMeter stdout meter
|
liftIO $ clearMeter stdout meter
|
||||||
return r
|
return r
|
||||||
#if WITH_CONCURRENTOUTPUT
|
|
||||||
go size o@(ConcurrentOutput {})
|
go size o@(ConcurrentOutput {})
|
||||||
|
#if WITH_CONCURRENTOUTPUT
|
||||||
| concurrentOutputEnabled o = withProgressRegion $ \r -> do
|
| concurrentOutputEnabled o = withProgressRegion $ \r -> do
|
||||||
(progress, meter) <- mkmeter size
|
(progress, meter) <- mkmeter size
|
||||||
a $ \n -> liftIO $ do
|
a $ \n -> liftIO $ do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue