--Return True if any pname in 'pns' is used by 'mod'
isUsedBy pns t
   = fromMaybe False (applyTU (once_tdTU (failTU `adhocTU` worker)) t)
        where    
         worker (pnt::PNT)
           | elem (pNTtoPN pnt) pns && isUsedInRhs pnt t
          = Just True
         worker _ = mzero     


-- Remove the definition from the original module.
isUsedBy pns t
   = fromMaybe False (applyTU (once_tdTU (failTU `adhocTU` worker)) t)
        where    
         worker (pnt::PNT)
           | elem (pNTtoPN pnt) pns && isUsedInRhs pnt t
          = Just True
         worker _ = mzero     


-- Remove the definition from the original module.
isUsedBy pns t
   = fromMaybe False (applyTU (once_tdTU (failTU `adhocTU` worker)) t)
        where    
         worker (pnt::PNT)
           | elem (pNTtoPN pnt) pns && isUsedInRhs pnt t
          = Just True
         worker _ = mzero     


-- Remove the definition from the original module.