diff options
Diffstat (limited to 'compiler/rename')
| -rw-r--r-- | compiler/rename/RnNames.hs | 8 | ||||
| -rw-r--r-- | compiler/rename/RnSource.hs | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs index 0aa33add9e..7ed96711b0 100644 --- a/compiler/rename/RnNames.hs +++ b/compiler/rename/RnNames.hs @@ -215,8 +215,8 @@ rnImportDecl this_mod -- check that "<pkg>" is "this" (which is magic) -- or the name of this_mod's package. Yurgh! -- c.f. GHC.findModule, and Trac #9997 - Nothing -> True - Just pkg_fs -> pkg_fs == fsLit "this" || + Nothing -> True + Just (_,pkg_fs) -> pkg_fs == fsLit "this" || fsToPackageKey pkg_fs == modulePackageKey this_mod)) (addErr (ptext (sLit "A module cannot import itself:") <+> ppr imp_mod_name)) @@ -229,7 +229,7 @@ rnImportDecl this_mod | otherwise -> whenWOptM Opt_WarnMissingImportList $ addWarn (missingImportListWarn imp_mod_name) - ifaces <- loadSrcInterface doc imp_mod_name want_boot mb_pkg + ifaces <- loadSrcInterface doc imp_mod_name want_boot (fmap snd mb_pkg) -- Compiler sanity check: if the import didn't say -- {-# SOURCE #-} we should not get a hi-boot file @@ -1596,7 +1596,7 @@ printMinimalImports imports_w_usage = do { let ImportDecl { ideclName = L _ mod_name , ideclSource = is_boot , ideclPkgQual = mb_pkg } = decl - ; ifaces <- loadSrcInterface doc mod_name is_boot mb_pkg + ; ifaces <- loadSrcInterface doc mod_name is_boot (fmap snd mb_pkg) ; let lies = map (L l) (concatMap (to_ie ifaces) used) ; return (L l (decl { ideclHiding = Just (False, L l lies) })) } where diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index d7c135eaba..3b745af25d 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -431,8 +431,9 @@ patchCImportSpec packageKey spec patchCCallTarget :: PackageKey -> CCallTarget -> CCallTarget patchCCallTarget packageKey callTarget = case callTarget of - StaticTarget label Nothing isFun -> StaticTarget label (Just packageKey) isFun - _ -> callTarget + StaticTarget src label Nothing isFun + -> StaticTarget src label (Just packageKey) isFun + _ -> callTarget {- ********************************************************* @@ -727,10 +728,10 @@ rnHsRuleDecl (HsRule rule_name act vars lhs _fv_lhs rhs _fv_rhs) ; checkDupRdrNames rdr_names_w_loc ; checkShadowedRdrNames rdr_names_w_loc ; names <- newLocalBndrsRn rdr_names_w_loc - ; bindHsRuleVars (unLoc rule_name) vars names $ \ vars' -> + ; bindHsRuleVars (snd $ unLoc rule_name) vars names $ \ vars' -> do { (lhs', fv_lhs') <- rnLExpr lhs ; (rhs', fv_rhs') <- rnLExpr rhs - ; checkValidRule (unLoc rule_name) names lhs' fv_lhs' + ; checkValidRule (snd $ unLoc rule_name) names lhs' fv_lhs' ; return (HsRule rule_name act vars' lhs' fv_lhs' rhs' fv_rhs', fv_lhs' `plusFV` fv_rhs') } } where |
