Commit bffff2ef authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add an ASSERT on 'pick'

parent 89c0f09a
......@@ -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
rdr_is_unqual = isUnqual rdr_name
rdr_is_qual = isQual_maybe rdr_name
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment