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.