codes while reading "Developing Web Applications with Haskell and Yesod"