diff options
author | David Terei <davidterei@gmail.com> | 2011-04-25 12:18:00 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-06-17 18:19:48 -0700 |
commit | 94434054df5633fc7aef9aad37aa26c8b2e011cd (patch) | |
tree | 0f7f43a3d124741df6a70dfe90b90a3713809204 /compiler/rename | |
parent | 6de1b0f2f4fe0455df72adb7b43449586b40ba89 (diff) | |
download | haskell-94434054df5633fc7aef9aad37aa26c8b2e011cd.tar.gz |
SafeHaskell: Force all imports to be safe in Safe mode
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnNames.lhs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 57166f4742..cd1cff6983 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -219,8 +219,10 @@ rnImportDecl this_mod implicit_prelude Just (is_hiding, ls) -> not is_hiding && null ls _ -> False + mod_safe' = mod_safe || safeImportsRequired dflags + imports = ImportAvails { - imp_mods = unitModuleEnv imp_mod [(qual_mod_name, import_all, loc, mod_safe)], + imp_mods = unitModuleEnv imp_mod [(qual_mod_name, import_all, loc, mod_safe')], imp_orphs = orphans, imp_finsts = finsts, imp_dep_mods = mkModDeps dependent_mods, @@ -234,7 +236,7 @@ rnImportDecl this_mod implicit_prelude _ -> return () ) - let new_imp_decl = L loc (ImportDecl loc_imp_mod_name mb_pkg want_boot mod_safe + let new_imp_decl = L loc (ImportDecl loc_imp_mod_name mb_pkg want_boot mod_safe' qual_only as_mod new_imp_details) return (new_imp_decl, gbl_env, imports, mi_hpc iface) |