Commit 651dd121 authored by Ian Lynagh's avatar Ian Lynagh

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.
parent 703ca154
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment