Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions compiled_starters/haskell/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ module Main (main) where
import Control.Monad (forever)
import qualified Data.ByteString.Char8 as BC
import Network.Socket
import System.IO (BufferMode (..), hSetBuffering, stdout)
import System.IO (BufferMode (NoBuffering), hSetBuffering, stdout, stderr)

main :: IO ()
main = do
hSetBuffering stdout LineBuffering
-- Disable output buffering
hSetBuffering stdout NoBuffering
hSetBuffering stderr NoBuffering

-- You can use print statements as follows for debugging, they'll be visible when running tests.
BC.putStrLn "Logs from your program will appear here"
Expand Down
6 changes: 4 additions & 2 deletions solutions/haskell/01-at4/code/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ module Main (main) where
import Control.Monad (forever)
import qualified Data.ByteString.Char8 as BC
import Network.Socket
import System.IO (BufferMode (..), hSetBuffering, stdout)
import System.IO (BufferMode (NoBuffering), hSetBuffering, stdout, stderr)

main :: IO ()
main = do
hSetBuffering stdout LineBuffering
-- Disable output buffering
hSetBuffering stdout NoBuffering
hSetBuffering stderr NoBuffering

let host = "127.0.0.1"
port = "4221"
Expand Down
8 changes: 5 additions & 3 deletions solutions/haskell/01-at4/diff/app/Main.hs.diff
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
@@ -1,36 +1,32 @@
@@ -1,38 +1,34 @@
{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

import Control.Monad (forever)
import qualified Data.ByteString.Char8 as BC
import Network.Socket
import System.IO (BufferMode (..), hSetBuffering, stdout)
import System.IO (BufferMode (NoBuffering), hSetBuffering, stdout, stderr)

main :: IO ()
main = do
hSetBuffering stdout LineBuffering
-- Disable output buffering
hSetBuffering stdout NoBuffering
hSetBuffering stderr NoBuffering

- -- You can use print statements as follows for debugging, they'll be visible when running tests.
- BC.putStrLn "Logs from your program will appear here"
Expand Down
6 changes: 4 additions & 2 deletions starter_templates/haskell/code/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ module Main (main) where
import Control.Monad (forever)
import qualified Data.ByteString.Char8 as BC
import Network.Socket
import System.IO (BufferMode (..), hSetBuffering, stdout)
import System.IO (BufferMode (NoBuffering), hSetBuffering, stdout, stderr)

main :: IO ()
main = do
hSetBuffering stdout LineBuffering
-- Disable output buffering
hSetBuffering stdout NoBuffering
hSetBuffering stderr NoBuffering

-- You can use print statements as follows for debugging, they'll be visible when running tests.
BC.putStrLn "Logs from your program will appear here"
Expand Down
Loading