getQualifier  modName (HsModule  _ _  _ imp _)  
    = let r=(nub.ghead "getQualifier") (applyTU (once_tdTU (constTU [] `adhocTU` inImport)) imp)
      in if r==[] then modName 
                  else head r     
    where 
    inImport ((HsImportDecl _ (SN m loc) _ as _ )::HsImportDeclP)
      | show modName == show m   
      = if isJust as then return [simpModName (gfromJust "getQualifier"  as)]
                     else return [] 
    inImport _ = mzero
 
    -- simpModName :: PosSyntax.ModuleName ->HsName.ModuleName
    simpModName (SN m loc) = m
getQualifier  modName (HsModule  _ _  _ imp _)  
    = let r=(nub.ghead "getQualifier") (applyTU (once_tdTU (constTU [] `adhocTU` inImport)) imp)
      in if r==[] then modName 
                  else head r     
    where 
    inImport ((HsImportDecl _ (SN m loc) _ as _ )::HsImportDeclP)
      | show modName == show m   
      = if isJust as then return [simpModName (gfromJust "getQualifier"  as)]
                     else return [] 
    inImport _ = mzero
 
    -- simpModName :: PosSyntax.ModuleName ->HsName.ModuleName
    simpModName (SN m loc) = m
getQualifier  modName (HsModule  _ _  _ imp _)  
    = let r=(nub.ghead "getQualifier") (applyTU (once_tdTU (constTU [] `adhocTU` inImport)) imp)
      in if r==[] then modName 
                  else head r     
    where 
    inImport ((HsImportDecl _ (SN m loc) _ as _ )::HsImportDeclP)
      | show modName == show m   
      = if isJust as then return [simpModName (gfromJust "getQualifier"  as)]
                     else return [] 
    inImport _ = mzero
 
    -- simpModName :: PosSyntax.ModuleName ->HsName.ModuleName
    simpModName (SN m loc) = m