diff options
author | simonmar <unknown> | 2003-11-06 10:44:52 +0000 |
---|---|---|
committer | simonmar <unknown> | 2003-11-06 10:44:52 +0000 |
commit | a2bca16d0c180768949a8f30592bb072c907b965 (patch) | |
tree | 93c07db693a6f89a92038e635f0d703531336e8b | |
parent | 1a7ccb86bb10ebc44e17c90ac5e27e7783958a22 (diff) |
[haddock @ 2003-11-06 10:44:52 by simonmar]
Include iface_reexported in the .haddock file. This unfortunately
bloats the file (40% for base). If this gets to be a problem we can
always apply the dictionary trick that GHC uses for squashing .hi
files.
-rw-r--r-- | src/Main.hs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Main.hs b/src/Main.hs index f3ccde26..25d6cc16 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -237,7 +237,9 @@ run flags files = do writeBinMem bh fn where prepared_ifaces = - [ (mdl, fmToList (iface_env iface), fmToList (iface_sub iface)) + [ (mdl, fmToList (iface_env iface), + fmToList (iface_reexported iface), + fmToList (iface_sub iface)) | (mdl, iface) <- these_mod_ifaces ] parseIfaceOption :: String -> (FilePath,FilePath) @@ -252,13 +254,13 @@ readIface filename = do stuff <- get bh return (map to_interface stuff) where - to_interface (mdl, env, sub) = + to_interface (mdl, env, reexported, sub) = (mdl, Interface { iface_filename = "", iface_env = listToFM env, iface_import_env = emptyFM, iface_sub = listToFM sub, - iface_reexported = emptyFM, + iface_reexported = listToFM reexported, iface_exports = [], iface_orig_exports = [], iface_insts = [], @@ -420,7 +422,14 @@ mkInterface no_implicit_prelude verbose mod_map filename let missing_names = missing_names1 ++ missing_names2 ++ missing_names4 --ignore missing_names3 & missing_names5 for now - name_strings = nub (map show missing_names) + filtered_missing_names = filter (`notElem` ignore) missing_names + + -- ignore certain builtin names ((),[], etc.), because these + -- cannot be exported anyway. + ignore = [unit_tycon_qname, fun_tycon_qname, list_tycon_qname, + unit_con_name, nil_con_name] + + name_strings = nub (map show filtered_missing_names) when (not (null name_strings)) $ tell ["Warning: " ++ show mdl ++ |