This monograph is not about the GHCI interpreter but, for those of you who are working with GHCI, here is a translation of this one program to a form the interpreter would like to see
From this you will get
which shows both the desired output and the interior object of the monad that is created. The output, of course, is a side effecdt that the IO monad is trying to hide. The [()] is an interior object of the IO monad. You'll see one reason why that is important in this section's exercise.
Weirdly GHCI throws that interior object away if it is () and shows it to you otherwise.
By the way:
Most of the source code you put into a .hs file can be executed in GHCI. For an example suppose hello.hs contained
I have purposely left the type signature for hello off because I want GHCI to tell me what it is.