Make it work with recent Yesod

Not tested yet, I just tweaked the types to make GHC happy.