From e604e916a9727a22a392062096ea947df5fbe2c6 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Tue, 19 Jan 2016 13:11:58 +0000 Subject: Comments only Re Trac #11051 --- compiler/main/InteractiveEval.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compiler/main') diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index b7ed44fa7e..b7c2178fc3 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 -- cgit v1.2.1