Catch up yesod-platform-1.2

migrate Foundation.hs and around it