By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Detect TH splices by span containment, not just AST wrappers The previous --skip-th-splices implementation only matched XExpr (ExpandedThingTc orig expanded) where orig was a splice node. That covers operator-style expansions, but most splices in Yesod/Persistent codebases (mkYesodData, mkPersist [persistLowerCase|...|], $(widgetFile ...)) are evaluated during renaming and the typechecked AST sees the result as if it were original code, with no wrapper. Collect splice spans from the parsed AST instead (HsUntypedSplice, HsTypedSplice, SpliceD), store them per-module in a process-global IORef, and in recordMutation drop any mutation whose RealSrcSpan is contained in a splice span. Walking the parsed AST uses Data generics so we don't have to enumerate every AST constructor.