Improve error reporting for out-of-scope variables
Sometimes when a variable is out of scope in the type-checker, it's not a GHC bug, but rather a TH staging error. See Note [Out of scope might be a staging error] in TcEnv. This showed up as Trac #5795.
Showing with 31 additions and 9 deletions