Skip to content

Set buffering to LineBuffering to stop mangled 'Compiline ModName' text #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions server/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import qualified Network.Wai.Handler.Warp as Warp
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.FilePath.Glob (glob)
import qualified System.IO as IO
import Web.Scotty
import qualified Web.Scotty as Scotty

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

main :: IO ()
main = do
-- Stop mangled "Compiling ModuleName" text
IO.hSetBuffering IO.stderr IO.LineBuffering
(portString : inputGlobs) <- getArgs
let port = read portString
inputFiles <- concat <$> traverse glob inputGlobs
Expand Down