- = do { local_env <- getLocalRdrEnv
- ; case lookupLocalRdrEnv local_env rdr_name of
- Just n -> check_local_name n
- Nothing -> do -- Not defined in a nested scope
+ = do { local_env <- getLocalRdrEnv
+ ; case lookupLocalRdrEnv local_env rdr_name of {
+ Just n -> check_local_name n;
+ Nothing -> do -- Not defined in a nested scope
- ; let gres = lookupGlobalRdrEnv env (rdrNameOcc rdr_name)
- ; case (filter isLocalGRE gres) of
- (gre:_) -> check_local_name (gre_name gre)
- -- If there is more than one local GRE for the
- -- same OccName 'f', that will be reported separately
- -- as a duplicate top-level binding for 'f'
- [] | null gres -> bale_out_with empty
- | otherwise -> bale_out_with import_msg
- }}
+ ; let gres = lookupGlobalRdrEnv env (rdrNameOcc rdr_name)
+ ; case (filter isLocalGRE gres) of
+ (gre:_) -> check_local_name (gre_name gre)
+ -- If there is more than one local GRE for the
+ -- same OccName 'f', that will be reported separately
+ -- as a duplicate top-level binding for 'f'
+ [] | null gres -> bale_out_with empty
+ | otherwise -> bale_out_with import_msg
+ }}}