Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/fix-loop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Aug 20, 2015
2 parents 95426d4 + b7cea06 commit 797aef2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Language/Haskell/GhcMod/Output.hs
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,14 @@ stdoutGateway chan = go ("", "")
case ty of
GmTerminated ->
case stream of
GmOut -> putStr (obuf++l) >> go ("", ebuf)
GmErr -> putStr (ebuf++l) >> go (obuf, "")
GmOut -> putStr (obuf++l) >> hFlush stdout >> go ("", ebuf)
GmErr -> putStr (ebuf++l) >> hFlush stdout >> go (obuf, "")
GmPartial -> case reverse $ lines l of
[] -> go buf
[x] -> go (appendBuf stream buf x)
x:xs -> do
putStr $ unlines $ reverse xs
hFlush stdout
go (appendBuf stream buf x)

appendBuf GmOut (obuf, ebuf) s = (obuf++s, ebuf)
Expand Down

0 comments on commit 797aef2

Please sign in to comment.