-lookupSigOccRn = lookupOccRn
-
-{- OLD VERSION
--- This code tries to be cleverer than the above.
--- The variable in a signature must refer to a locally-defined thing,
--- even if there's an imported thing of the same name.
---
--- But this doesn't work for instance decls:
--- instance Enum Int where
--- {-# INLINE enumFrom #-}
--- ...
--- Here the enumFrom is an imported reference!
-lookupSigOccRn rdr_name
- = getNameEnvs `thenRn` \ (global_env, local_env) ->
- case (lookupRdrEnv local_env rdr_name, lookupRdrEnv global_env rdr_name) of
- (Just name, _) -> returnRn name
-
- (Nothing, Just names) -> case filter isLocallyDefined names of
- [n] -> returnRn n
- ns -> pprPanic "lookupSigOccRn" (ppr rdr_name <+> ppr names <+> ppr ns)
- -- There can't be a local top-level name-clash
- -- (That's dealt with elsewhere.)
-
- (Nothing, Nothing) -> failWithRn (mkUnboundName rdr_name)
- (unknownNameErr rdr_name)
--}
-