T13837.hs:9:4: error: • The exact Name ‘Fam’ is not in scope Probable cause: you used a unique Template Haskell name (NameU), perhaps via newName, but did not bind it If that's it, then -ddump-splices might be useful • In the argument of reifyInstances: Fam_0 In the untyped splice: $(do fam_name <- newName "Fam" stringE . show =<< qReifyInstances fam_name [])