[commit: ghc] master: Comments only (e604e91)

git at git.haskell.org git at git.haskell.org
Thu Jan 21 10:08:39 UTC 2016


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

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

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

commit e604e916a9727a22a392062096ea947df5fbe2c6
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Jan 19 13:11:58 2016 +0000

    Comments only
    
    Re Trac #11051


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

e604e916a9727a22a392062096ea947df5fbe2c6
 compiler/main/InteractiveEval.hs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
index b7ed44f..b7c2178 100644
--- a/compiler/main/InteractiveEval.hs
+++ b/compiler/main/InteractiveEval.hs
@@ -248,8 +248,18 @@ runDeclsWithLocation source linenumber expr =
     hsc_env' <- liftIO $ rttiEnvironment hsc_env
     modifySession (\_ -> hsc_env')
     return $ filter (not . isDerivedOccName . nameOccName)
+             -- For this filter, see Note [What to show to users]
            $ map getName tyThings
 
+{- Note [What to show to users]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+We don't want to display internally-generated bindings to users.
+Things like the coercion axiom for newtypes. These bindings all get
+OccNames that users can't write, to avoid the possiblity of name
+clashes (in linker symbols).  That gives a convenient way to suppress
+them. The relevant predicate is OccName.isDerivedOccName.
+See Trac #11051 for more background and examples.
+-}
 
 withVirtualCWD :: GhcMonad m => m a -> m a
 withVirtualCWD m = do



More information about the ghc-commits mailing list