File tree Expand file tree Collapse file tree 4 files changed +17
-9
lines changed
compiled_starters/haskell/app
starter_templates/haskell/code/app Expand file tree Collapse file tree 4 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,13 @@ module Main (main) where
55import Control.Monad (forever )
66import qualified Data.ByteString.Char8 as BC
77import Network.Socket
8- import System.IO (BufferMode (.. ), hSetBuffering , stdout )
8+ import System.IO (BufferMode (NoBuffering ), hSetBuffering , stdout , stderr )
99
1010main :: IO ()
1111main = do
12- hSetBuffering stdout LineBuffering
12+ -- Disable output buffering
13+ hSetBuffering stdout NoBuffering
14+ hSetBuffering stderr NoBuffering
1315
1416 -- You can use print statements as follows for debugging, they'll be visible when running tests.
1517 BC. putStrLn " Logs from your program will appear here"
Original file line number Diff line number Diff line change @@ -5,11 +5,13 @@ module Main (main) where
55import Control.Monad (forever )
66import qualified Data.ByteString.Char8 as BC
77import Network.Socket
8- import System.IO (BufferMode (.. ), hSetBuffering , stdout )
8+ import System.IO (BufferMode (NoBuffering ), hSetBuffering , stdout , stderr )
99
1010main :: IO ()
1111main = do
12- hSetBuffering stdout LineBuffering
12+ -- Disable output buffering
13+ hSetBuffering stdout NoBuffering
14+ hSetBuffering stderr NoBuffering
1315
1416 let host = " 127.0.0.1"
1517 port = " 4221"
Original file line number Diff line number Diff line change 1- @@ -1,36 +1,32 @@
1+ @@ -1,38 +1,34 @@
22 {-# LANGUAGE OverloadedStrings #-}
33
44 module Main (main) where
55
66 import Control.Monad (forever)
77 import qualified Data.ByteString.Char8 as BC
88 import Network.Socket
9- import System.IO (BufferMode (.. ), hSetBuffering, stdout)
9+ import System.IO (BufferMode (NoBuffering ), hSetBuffering, stdout, stderr )
1010
1111 main :: IO ()
1212 main = do
13- hSetBuffering stdout LineBuffering
13+ -- Disable output buffering
14+ hSetBuffering stdout NoBuffering
15+ hSetBuffering stderr NoBuffering
1416
1517- -- You can use print statements as follows for debugging, they'll be visible when running tests.
1618- BC.putStrLn "Logs from your program will appear here"
Original file line number Diff line number Diff line change @@ -5,11 +5,13 @@ module Main (main) where
55import Control.Monad (forever )
66import qualified Data.ByteString.Char8 as BC
77import Network.Socket
8- import System.IO (BufferMode (.. ), hSetBuffering , stdout )
8+ import System.IO (BufferMode (NoBuffering ), hSetBuffering , stdout , stderr )
99
1010main :: IO ()
1111main = do
12- hSetBuffering stdout LineBuffering
12+ -- Disable output buffering
13+ hSetBuffering stdout NoBuffering
14+ hSetBuffering stderr NoBuffering
1315
1416 -- You can use print statements as follows for debugging, they'll be visible when running tests.
1517 BC. putStrLn " Logs from your program will appear here"
You can’t perform that action at this time.
0 commit comments