X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcSplice.lhs;h=2844ab42a7e5876991e9c6ff6fbd0265be70f28c;hb=10dd2a6d050e4779782800184014b8738fadc679;hp=500e1941a27f4634993d602f86ccbd13bac2a6c3;hpb=741f70aa18baec781bd6c275e36f918b4dcdae75;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcSplice.lhs b/ghc/compiler/typecheck/TcSplice.lhs index 500e194..2844ab4 100644 --- a/ghc/compiler/typecheck/TcSplice.lhs +++ b/ghc/compiler/typecheck/TcSplice.lhs @@ -472,8 +472,8 @@ reify th_name ppr_ns (TH.Name _ (TH.NameG TH.VarName mod)) = text "var" lookupThName :: TH.Name -> TcM Name -lookupThName th_name - = do { let rdr_name = thRdrName guessed_ns th_name +lookupThName th_name@(TH.Name occ flavour) + = do { let rdr_name = thRdrName guessed_ns occ_str flavour -- Repeat much of lookupOccRn, becase we want -- to report errors in a TH-relevant way @@ -491,9 +491,9 @@ lookupThName th_name } where -- guessed_ns is the name space guessed from looking at the TH name - guessed_ns | isLexCon occ_fs = OccName.dataName - | otherwise = OccName.varName - occ_fs = mkFastString (TH.nameBase th_name) + guessed_ns | isLexCon (mkFastString occ_str) = OccName.dataName + | otherwise = OccName.varName + occ_str = TH.occString occ tcLookupTh :: Name -> TcM TcTyThing -- This is a specialised version of TcEnv.tcLookup; specialised mainly in that