From 896340a1407bf99bd5700ed5d296c668971876f3 Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Wed, 14 Mar 2018 14:17:23 +0100 Subject: fixtures: Prevent stdout buffering --- haddock-library/fixtures/Fixtures.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'haddock-library/fixtures/Fixtures.hs') diff --git a/haddock-library/fixtures/Fixtures.hs b/haddock-library/fixtures/Fixtures.hs index 54fca012..282fd10d 100644 --- a/haddock-library/fixtures/Fixtures.hs +++ b/haddock-library/fixtures/Fixtures.hs @@ -14,6 +14,7 @@ import Prelude.Compat import System.Directory (getDirectoryContents) import System.Exit (exitFailure) import System.FilePath +import System.IO import Data.TreeDiff import Data.TreeDiff.Golden @@ -106,7 +107,9 @@ parseString = Parse.toRegular . _doc . Parse.parseParas data Cmd = CmdRun | CmdAccept | CmdList main :: IO () -main = runCmd =<< O.execParser opts +main = do + hSetBuffering stdout NoBuffering -- For interleaved output when debugging + runCmd =<< O.execParser opts where opts = O.info (O.helper <*> cmdParser) O.fullDesc -- cgit v1.2.3