How to write a simple TCP Server in Haskell - good coders code, great reuse: "main :: IO ()
main = withSocketsDo $ do
args <- getArgs
let port = fromIntegral (read $ head args :: Int)
sock <- listenOn $ PortNumber port
putStrLn $ 'Listening on ' ++ (head args)
sockHandler sock"