“IO” can mean a lot of different things, so let’s start the discussion by establishing a bit of terminology. In this book, there are three different ways that we’ll use the term “IO.” In the most general sense, we’ll use the term IO to talk about the general concept of a program interacting with the outside world by doing things like reading files or writing stuff to the screen. Exactly what you’d expect.
Slightly more specifically than general IO are IO Actions . You’ll learn more about these throughout this chapter, but for now you can think of it like this: IO is a general concept of doing some input or output. An IO action is a specific example of your program taking some action to do IO. In other words, “reading a file” is IO, but a specific function that reads the contents of a file is an IO action.
Finally, you’ll learn about the IO type. A value of type IO a represents some computation that may have some side effects and will result in a value of type a .