Template Haskell originally only supported Haskell 98, but various non-H98 extensions have since been added. Apparently, TH patterns can contain type signatures (I didn't know that), but there does not seem to be any support for lexical scoping of type variables.
Since GHC itself is in a state of flux wrt lexically scoped type variables, I'm not going to fix this now. I would love some TH enthusiast to take it on.
Meanwhile, just avoid type signatures in patterns.
Simon