addQualifier pns qualifier t
  =applyTP (full_tdTP (adhocTP idTP rename)) t
       where
         rename pnt@(PNT pn@(PN (UnQual s) l) ty loc)
          | elem pn pns && isUsedInRhs pnt t
          = do let pnt'=(PNT (PN (Qual (strToModName qualifier) s) l) ty loc)
               update pnt pnt' pnt
         rename x=return x
addQualifier pns qualifier t
  =applyTP (full_tdTP (adhocTP idTP rename)) t
       where
         rename pnt@(PNT pn@(PN (UnQual s) l) ty loc)
          | elem pn pns && isUsedInRhs pnt t
          = do let pnt'=(PNT (PN (Qual (strToModName qualifier) s) l) ty loc)
               update pnt pnt' pnt
         rename x=return x
addQualifier pns qualifier t
  =applyTP (full_tdTP (adhocTP idTP rename)) t
       where
         rename pnt@(PNT pn@(PN (UnQual s) l) ty loc)
          | elem pn pns && isUsedInRhs pnt t
          = do let pnt'=(PNT (PN (Qual (strToModName qualifier) s) l) ty loc)
               update pnt pnt' pnt
         rename x=return x