summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface/Load.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Iface/Load.hs')
-rw-r--r--compiler/GHC/Iface/Load.hs16
1 files changed, 11 insertions, 5 deletions
diff --git a/compiler/GHC/Iface/Load.hs b/compiler/GHC/Iface/Load.hs
index 53560ca732..4ba0e1966a 100644
--- a/compiler/GHC/Iface/Load.hs
+++ b/compiler/GHC/Iface/Load.hs
@@ -53,7 +53,7 @@ import GHC.Settings.Constants
import GHC.Builtin.Names
import GHC.Builtin.Utils
import GHC.Builtin.PrimOps ( allThePrimOps, primOpFixity, primOpOcc )
-import GHC.Types.Id.Make ( seqId )
+import GHC.Types.Id.Make ( seqId, EnableBignumRules(..) )
import GHC.Core.Rules
import GHC.Core.TyCon
import GHC.Types.Annotations
@@ -1016,8 +1016,8 @@ readIface wanted_mod file_path
*********************************************************
-}
-initExternalPackageState :: ExternalPackageState
-initExternalPackageState
+initExternalPackageState :: DynFlags -> ExternalPackageState
+initExternalPackageState dflags
= EPS {
eps_is_boot = emptyUFM,
eps_PIT = emptyPackageIfaceTable,
@@ -1025,7 +1025,7 @@ initExternalPackageState
eps_PTE = emptyTypeEnv,
eps_inst_env = emptyInstEnv,
eps_fam_inst_env = emptyFamInstEnv,
- eps_rule_base = mkRuleBase builtinRules,
+ eps_rule_base = mkRuleBase builtinRules',
-- Initialise the EPS rule pool with the built-in rules
eps_mod_fam_inst_env
= emptyModuleEnv,
@@ -1033,8 +1033,14 @@ initExternalPackageState
eps_ann_env = emptyAnnEnv,
eps_stats = EpsStats { n_ifaces_in = 0, n_decls_in = 0, n_decls_out = 0
, n_insts_in = 0, n_insts_out = 0
- , n_rules_in = length builtinRules, n_rules_out = 0 }
+ , n_rules_in = length builtinRules', n_rules_out = 0 }
}
+ where
+ enableBignumRules
+ | homeUnitId dflags == primUnitId = EnableBignumRules False
+ | homeUnitId dflags == bignumUnitId = EnableBignumRules False
+ | otherwise = EnableBignumRules True
+ builtinRules' = builtinRules enableBignumRules
{-
*********************************************************