main = do putStrLn "What's your name?" name <- getLine putStrLn ("Hello " ++ name)
(And a few bits of category do help when you are toying around with other typeclasses. Have a look at the typeclassopedia for an introduction.)