[commit: ghc] type-holes-branch: Print only ATcIds for which isExternalName is False. This is the right way to only print what is in the local scope. (68b7db7)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : type-holes-branch

http://hackage.haskell.org/trac/ghc/changeset/68b7db7e86021fd322df9e88a4af6f4c2740888f

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

commit 68b7db7e86021fd322df9e88a4af6f4c2740888f
Author: Thijs Alkemade <[email protected]>
Date:   Thu Aug 30 21:08:57 2012 +0200

    Print only ATcIds for which isExternalName is False. This is the right way to only print what is in the local scope.

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

 compiler/typecheck/TcErrors.lhs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs
index 8b44dce..6e9ca14 100644
--- a/compiler/typecheck/TcErrors.lhs
+++ b/compiler/typecheck/TcErrors.lhs
@@ -503,7 +503,7 @@ mkHoleDeferredError ctxt ct@(CHoleCan {})
                                                                           }
 
     get_thing :: TcTyThing -> Maybe (Var, TcType)
-    get_thing (ATcId thing_id _ _) = Just (thing_id, varType thing_id)
+    get_thing (ATcId thing_id _ _) = if not (isExternalName (Var.varName thing_id)) then Just (thing_id, varType thing_id) else Nothing
     get_thing _ = Nothing
 
     ppr_local_bind :: (Var, Type) -> SDoc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.