Source code to Simon Thompson's Haskell: The Craft of Functional Programming, 3rd ed.