Fixed Haddock code

Based on the [discussion here](https://groups.google.com/d/msg/yesodweb/MhF_09k4OGk/1alXBGtNYMwJ), I'm patching it appropriately. The previous code doesn't typecheck. This patch fixes it.
Merge pull request #67 from psibi/patch-1

Fixed Haddock code