Go to the first, previous, next, last section, table of contents.

Duffer's guide for converting 1.2 I/O to 1.3 I/O

Here is our "crib sheet" for converting 1.2 I/O to 1.3. In most cases, it's really easy.

  1. Change `readChan stdin' to `hGetContents stdin'.
  2. Change `appendChan stdout' to `putStr', which is equivalent to `hPutStr stdout'. Change `appendChan stderr' to `hPutStr stderr'.
  3. You need to `import LibSystem' if you used `getArgs', `getEnv', or `getProgName'.
  4. Assuming continuation-style `Dialogue' code, change `... exit done $' to `... >>'. Change `... exit $ \ foo ->' to `... >>= \ foo ->'.
  5. If you had any functions named `(>>)', `(>>=)', or `return', change them to something else.


Go to the first, previous, next, last section, table of contents.