ch07-basicio from book.realworldhaskell.org