[commit: ghc] master: Top-level comment for keepPackageImports. (f5996d9)

git at git.haskell.org git at git.haskell.org
Fri Nov 7 21:43:19 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f5996d9106f5b6b12e52ad93256233fc1cc459c9/ghc

>---------------------------------------------------------------

commit f5996d9106f5b6b12e52ad93256233fc1cc459c9
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Tue Nov 4 13:05:13 2014 -0800

    Top-level comment for keepPackageImports.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


>---------------------------------------------------------------

f5996d9106f5b6b12e52ad93256233fc1cc459c9
 ghc/InteractiveUI.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index ed4ea7b..e6d1529 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -1469,7 +1469,10 @@ setContextKeepingPackageModules keep_ctx trans_ctx = do
                    transient_ctx  = filterSubsumed new_rem_ctx trans_ctx }
   setGHCContextFromGHCiState
 
-
+-- | Filters a list of 'InteractiveImport', clearing out any home package
+-- imports so only imports from external packages are preserved.  ('IIModule'
+-- counts as a home package import, because we are only able to bring a
+-- full top-level into scope when the source is available.)
 keepPackageImports :: [InteractiveImport] -> GHCi [InteractiveImport]
 keepPackageImports = filterM is_pkg_import
   where



More information about the ghc-commits mailing list