Skip to content

Commit f29795b

Browse files
Set buffering to LineBuffering to stop mangled 'Compiline ModName' text (#228)
1 parent 8cd250b commit f29795b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/Main.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import qualified Network.Wai.Handler.Warp as Warp
4646
import System.Environment (getArgs)
4747
import System.Exit (exitFailure)
4848
import System.FilePath.Glob (glob)
49+
import qualified System.IO as IO
4950
import Web.Scotty
5051
import qualified Web.Scotty as Scotty
5152

@@ -227,6 +228,8 @@ tryParseType = hush . fmap (CST.convertType "<file>") . runParser CST.parseTypeP
227228

228229
main :: IO ()
229230
main = do
231+
-- Stop mangled "Compiling ModuleName" text
232+
IO.hSetBuffering IO.stderr IO.LineBuffering
230233
(portString : inputGlobs) <- getArgs
231234
let port = read portString
232235
inputFiles <- concat <$> traverse glob inputGlobs

0 commit comments

Comments
 (0)