In the recipes that we saw earlier, we all worked with IO, and used functions such as putStrLn :: String -> IO () or print :: Show a => a -> IO (). We already know that these functions print the string or a value to standard output.
In this recipe, we will open a file, read it line by line, and output it on the stdout along with the line number. We will also understand how IO works as a monad and how IO allows a Haskell program to interact with the outside world.