The primary logic in a program, which is input-process-output and repeat. The main loop continually tests for input and calls the appropriate routines to process it. Outputs are updated files sent to ...
Buffered I/O: as with C's Standard Library, IO Channels provide user-side buffering, which minimizes the number of system call invocations and ensures that I/O is performed in optimally sized units.