From: Ian Lynagh Date: Tue, 7 Jul 2009 13:34:27 +0000 (+0000) Subject: When exporting F(..), all the children of F are also exported X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=651dd121a65827884eea23605026d16e26d4301c;p=ghc-hetmet.git When exporting F(..), all the children of F are also exported This fixes the unused imports warning when Foo (F(x,y,z)) is imported and Foo (F(..)) is exported. --- diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 781de31..1052db6 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -951,6 +951,10 @@ exports_from_avail (Just rdr_items) rdr_env imports this_mod lookup_ie ie@(IEThingAll rdr) = do name <- lookupGlobalOccRn rdr let kids = findChildren kids_env name + mkKidRdrName = case isQual_maybe rdr of + Nothing -> mkRdrUnqual + Just (modName, _) -> mkRdrQual modName + addUsedRdrNames $ map (mkKidRdrName . nameOccName) kids when (null kids) (if (isTyConName name) then addWarn (dodgyExportWarn name) -- This occurs when you export T(..), but