StackOverflow 文档 Haskell Language 教程 IO 从标准输入读取一行 从标准输入读取一行 Created: November-22, 2018 main = do line <- getLine putStrLn line 输入: This is an example. 输出: This is an example. 从整个文件中读取单词IO 的角色和目的