Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/bffff2ef177018174737b0f6d61e1082283293f8 >--------------------------------------------------------------- commit bffff2ef177018174737b0f6d61e1082283293f8 Author: Simon Peyton Jones <[email protected]> Date: Fri Dec 23 17:25:36 2011 +0000 Add an ASSERT on 'pick' >--------------------------------------------------------------- compiler/basicTypes/RdrName.lhs | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/compiler/basicTypes/RdrName.lhs b/compiler/basicTypes/RdrName.lhs index d7f4ced..de0ff56 100644 --- a/compiler/basicTypes/RdrName.lhs +++ b/compiler/basicTypes/RdrName.lhs @@ -506,6 +506,7 @@ pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt] -- ^ Take a list of GREs which have the right OccName -- Pick those GREs that are suitable for this RdrName -- And for those, keep only only the Provenances that are suitable +-- Only used for Qual and Unqual, not Orig or Exact -- -- Consider: -- @@ -522,7 +523,8 @@ pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt] -- the locally-defined @f@, and a GRE for the imported @f@, with a /single/ -- provenance, namely the one for @Baz(f)@. pickGREs rdr_name gres - = mapCatMaybes pick gres + = ASSERT2( isSrcRdrName rdr_name, ppr rdr_name ) + mapCatMaybes pick gres where rdr_is_unqual = isUnqual rdr_name rdr_is_qual = isQual_maybe rdr_name _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
