[Checkpointing ch08-io comments John Goerzen **20080311061044] { hunk ./en/ch08-io.xml 134 - An expression may produce an action as its - value, but the action will not perform I/O until it is performed + Any expression may produce an action as its + value, but the action will not perform I/O until it is executed hunk ./en/ch08-io.xml 146 - &getLine; is storing an I/O action. When that action is run, you get + &getLine; is storing an I/O action. When that action is + performed, + you get hunk ./en/ch08-io.xml 150 - from an I/O action and store it in a - variable.Or, more technically, it is used to - pull pure code into an I/O action. - + from performing an I/O action and store it in a + variable. hunk ./en/ch08-io.xml 172 + FIXME: describe more on indentation of do blocks here, + space vs. tabs, etc? hunk ./en/ch08-io.xml 201 - When you're working in a &do; block, remember: you use &larrow; to get - results from &IO; actions and &let; to get results from pure code. + When you're working in a &do; block, you use &larrow; to get + results from &IO; actions and &let; to get results from pure + code. When used in a &do; block, you should not put + in after your &let; statement. hunk ./en/ch08-io.xml 213 - could not. That's because name2reply is pure - code, and not an action. + could not. That's because name2reply is a pure + function, not an action. hunk ./en/ch08-io.xml 249 - Pure vs. Impure Code + Pure vs. I/O hunk ./en/ch08-io.xml 252 - pure and impure code, here's a comparison table. When we + pure code and I/O, here's a comparison table. When we hunk ./en/ch08-io.xml 255 - and have no side effects. In Haskell, the only impure code is - the execution of I/O actions. + and have no side effects. In Haskell, only the execution of + I/O actions avoid these rules. hunk ./en/ch08-io.xml 259 - Pure vs. Impure Code + Pure vs. I/O hunk ./en/ch08-io.xml 281 + Never alters state hunk ./en/ch08-io.xml 284 - Never alters state hunk ./en/ch08-io.xml 295 - distinction between pure and impure code. Most languages + distinction between pure code and I/O actions. Most languages hunk ./en/ch08-io.xml 308 - for the same input. As multithreadining and other forms of - parallelism becomt more and more common, it becomes more + for the same input. As multithreading and other forms of + parallelism grow increasingly common, it becomes more hunk ./en/ch08-io.xml 323 + FIXME: discussion of the problem of logging from pure code hunk ./en/ch08-io.xml 334 - So far, you've seen how to work with the terminal. Of course, you'll + So far, you've seen how to interact with the user at the + computer's terminal. Of course, you'll hunk ./en/ch08-io.xml 340 - Haskell defines quite a few basic functions for I/O. The library + Haskell defines quite a few basic functions for I/O, many of + which are similar to functions seen in other programming + languages. The library hunk ./en/ch08-io.xml 344 - them all, should you need one that we aren't touching upon - here. Many of these are similar to functions you would see in - other programming languages. + all the basic I/O functions, should you need one that we aren't touching upon + here. hunk ./en/ch08-io.xml 357 - &hClose; to close the &Handle; again. These functions are all defined + &hClose; to close the &Handle;. These functions are all defined hunk ./en/ch08-io.xml 375 - Like every Haskell program, execution of this program begins as + Like every Haskell program, execution of this program begins with hunk ./en/ch08-io.xml 383 - end of file (EOF) for the input. If we are, then we return - ()&emdash;this function doesn't return any other specific - value. Otherwise, we read a line from the input. We write out the + end of file (EOF) for the input. If not, we read a line from the input. We write out the }