X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnNames.lhs;h=9a95a85b78a428745423f5286bee0ebf569e746c;hb=8052a2b101be9ea988db76b9107441fafc401c17;hp=7aad1171c659504c4cbcf02fcf9de9d4d259f4d1;hpb=cae75f82226638691cfa1e85fc168f4b65ddce4d;p=ghc-hetmet.git diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 7aad117..9a95a85 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -372,13 +372,16 @@ get_local_binders gbl_env (HsGroup {hs_valds = ValBindsIn _ val_sigs, mod = tcg_mod gbl_env is_hs_boot = isHsBoot (tcg_src gbl_env) ; + for_hs_bndrs :: [Located RdrName] for_hs_bndrs = [nm | L _ (ForeignImport nm _ _) <- foreign_decls] -- In a hs-boot file, the value binders come from the -- *signatures*, and there should be no foreign binders + val_bndrs :: [Located RdrName] val_bndrs | is_hs_boot = [nm | L _ (TypeSig nm _) <- val_sigs] | otherwise = for_hs_bndrs + new_simple :: Located RdrName -> RnM (GenAvailInfo Name) new_simple rdr_name = do nm <- newTopSrcBinder mod rdr_name return (Avail nm) @@ -633,7 +636,7 @@ filterAvail keep ie rest = let left = filter keep ns in if null left then rest else AvailTC tc left : rest --- | Given an import/export spec, construct the appropriate 'GlobalRdrElt's. +-- | Given an import\/export spec, construct the appropriate 'GlobalRdrElt's. gresFromIE :: ImpDeclSpec -> (LIE Name, AvailInfo) -> [GlobalRdrElt] gresFromIE decl_spec (L loc ie, avail) = gresFromAvail prov_fn avail