T5971.hs:6:6: error: • The exact Name ‘x’ 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 untyped splice: $(newName "x" >>= varE)