+ where
+ avoided_fn Nothing -- the thing should be in the source
+ = (emptyBag, emptyBag, emptyBag, emptyBag, emptyBag)
+ avoided_fn (Just (Left rn@(WiredInId _))) -- a builtin value brought into scope
+ = (unitBag rn, emptyBag, emptyBag, emptyBag, emptyBag)
+ avoided_fn (Just (Right rn@(WiredInTyCon tc)))
+ -- a builtin tc brought into scope; we also must bring its
+ -- data constructors into scope
+ = --pprTrace "avoided:Right:" (ppr PprDebug rn) $
+ (listToBag [WiredInId dc | dc <- tyConDataCons tc], unitBag rn, emptyBag, emptyBag, emptyBag)
+
+-------------------------
+checkOrigIE :: IfaceCache
+ -> (IE OrigName, ExportFlag)
+ -> IO (Bag (Module -> SrcLoc -> Error), Bag (Module -> SrcLoc -> Warning))