disentangle concurrency and message type
This makes -Jn work with --json and --quiet, where before setting -Jn disabled those options. Concurrent json output is currently a mess though since threads output chunks over top of one-another.
This commit is contained in:
parent
8e9267a1ed
commit
8ef494a833
12 changed files with 96 additions and 84 deletions
|
@ -15,7 +15,7 @@ import Data.Default
|
|||
import System.Console.Regions (ConsoleRegion)
|
||||
#endif
|
||||
|
||||
data OutputType = NormalOutput | QuietOutput | ConcurrentOutput Int Bool | JSONOutput
|
||||
data OutputType = NormalOutput | QuietOutput | JSONOutput
|
||||
deriving (Show)
|
||||
|
||||
data SideActionBlock = NoBlock | StartBlock | InBlock
|
||||
|
@ -23,6 +23,7 @@ data SideActionBlock = NoBlock | StartBlock | InBlock
|
|||
|
||||
data MessageState = MessageState
|
||||
{ outputType :: OutputType
|
||||
, concurrentOutputEnabled :: Bool
|
||||
, sideActionBlock :: SideActionBlock
|
||||
, implicitMessages :: Bool
|
||||
#ifdef WITH_CONCURRENTOUTPUT
|
||||
|
@ -35,6 +36,7 @@ instance Default MessageState
|
|||
where
|
||||
def = MessageState
|
||||
{ outputType = NormalOutput
|
||||
, concurrentOutputEnabled = False
|
||||
, sideActionBlock = NoBlock
|
||||
, implicitMessages = True
|
||||
#ifdef WITH_CONCURRENTOUTPUT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue