T13837.hs:9:4: error: [GHC-97784] • The Name ‘Fam’ is not in scope. • In the argument of reifyInstances: Fam_0 In the untyped splice: $(do fam_name <- newName "Fam" stringE . show =<< qReifyInstances fam_name []) Suggested fix: If you bound a unique Template Haskell name (NameU) perhaps via newName, then -ddump-splices might be useful.