import Network import System.IO ask :: String -> IO () ask what = do h <- connectTo "localhost" $ PortNumber 9002 _ <- hGetLine h hPutStrLn h what result <- hGetLine h putStrLn $ what ++ ": " ++ result main :: IO () main = withSocketsDo $ do ask "DATE" ask "TIME"