on master help sign in
Merge pull request #4498 from Infinisil/line-buffering

Set stdout line buffering before building inputs

commitc5c8ede51742d03afc701e9fd854f979a5362550 authorNiklas Larsson <metaniklas@gmail.com> dateFri 29 Jun 2018, 00:09 (8 years ago) parenta675cdbc78d502
2 files changed+2−3
src/Idris/Main.hs+1−2 test/pkg008/expected+1−1
src/Idris/Main.hs+1−2
@@ -112,6 +112,7 @@ idrisMain opts =
112112 putIState (i { default_total = DefaultCheckingTotal })
113113 tty <- runIO isATTY
114114 setColourise $ not quiet && last (tty : opt getColour opts)
115+ runIO $ hSetBuffering stdout LineBuffering
115116
116117
117118
@@ -181,8 +182,6 @@ idrisMain opts =
181182 [] -> ""
182183 (f:_) -> f
183184
184− runIO $ hSetBuffering stdout LineBuffering
185−
186185 ok <- noErrors
187186 when ok $ case output of
188187 [] -> return ()
test/pkg008/expected+1−1
@@ -2,9 +2,9 @@ Entering directory `./src'
22Type checking ./NumOps.idr
33Type checking ./Test.idr
44Leaving directory `./src'
5+Entering directory `./src'
56Test Passed
67Test Passed
7−Entering directory `./src'
88Leaving directory `./src'
99Entering directory `./src'
1010Removed: NumOps.ibc