Another raft of Template Haskell clean-up
The handling of typed and untyped brackets was extremely convoluted, partly because of the evolutionary history. I've tidied it all up. See Note [How brackets and nested splices are handled] in TcSplice for the full story Main changes: * Untyped brackets: after the renamer, HsRnBracketOut carries PendingRnSplices for splices in untyped brackets. In the typechecker, these pending splices are typechecked quite straigtforwardly, with no ps_var nonsense. * Typed brackets: after the renamer typed brackest still look like HsBracket. The type checker does the ps_var thing. * In TcRnTypes.ThStage, the Brack constructor, we distinguish the renaming from typehecking pending-stuff. Much more perspicuous! * The "typed" flag is in HsSpliceE, not in HsSplice, because only expressions can be typed. Patterns, types, declarations cannot. There is further improvement to be done to make the handling of declaration splices more uniform.
Showing with 430 additions and 625 deletions