summaryrefslogtreecommitdiff
path: root/compiler/coreSyn/CorePrep.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/coreSyn/CorePrep.hs')
-rw-r--r--compiler/coreSyn/CorePrep.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs
index 9c2954d4ef..26706b1cdd 100644
--- a/compiler/coreSyn/CorePrep.hs
+++ b/compiler/coreSyn/CorePrep.hs
@@ -1537,14 +1537,15 @@ lookupMkNaturalName dflags hsc_env
= guardNaturalUse dflags $ liftM tyThingId $
lookupGlobal hsc_env mkNaturalName
+-- See Note [The integer library] in PrelNames
lookupIntegerSDataConName :: DynFlags -> HscEnv -> IO (Maybe DataCon)
-lookupIntegerSDataConName dflags hsc_env = case cIntegerLibraryType of
+lookupIntegerSDataConName dflags hsc_env = case integerLibrary dflags of
IntegerGMP -> guardIntegerUse dflags $ liftM (Just . tyThingDataCon) $
lookupGlobal hsc_env integerSDataConName
IntegerSimple -> return Nothing
lookupNaturalSDataConName :: DynFlags -> HscEnv -> IO (Maybe DataCon)
-lookupNaturalSDataConName dflags hsc_env = case cIntegerLibraryType of
+lookupNaturalSDataConName dflags hsc_env = case integerLibrary dflags of
IntegerGMP -> guardNaturalUse dflags $ liftM (Just . tyThingDataCon) $
lookupGlobal hsc_env naturalSDataConName
IntegerSimple -> return Nothing