[Template-haskell] Big TH commit