-lookupThName (TH.Name occ (TH.NameU uniq))
- = return (mkInternalName (mk_uniq uniq) (OccName.mkOccFS bogus_ns occ_fs) noSrcLoc)
- where
- occ_fs = mkFastString (TH.occString occ)
- bogus_ns = OccName.varName -- Not yet recorded in the TH name
- -- but only the unique matters
-
-lookupThName th_name@(TH.Name occ flavour) -- NameS or NameQ
- = do { let occ = OccName.mkOccFS ns occ_fs
- rdr_name = case flavour of
- TH.NameS -> mkRdrUnqual occ
- TH.NameQ m -> mkRdrQual (mkModule (TH.modString m)) occ
+ -- Repeat much of lookupOccRn, becase we want
+ -- to report errors in a TH-relevant way