-- Slightly modified from http://learnyouahaskell.com/input-and-output -- check the types of these functions! main = chat >> putStrLn "Bye!" chat = putStrLn "Hello, what's your name?" >> getLine >>= \ name -> putStrLn ("Hey " ++ name ++ ", you rock!")