Commit e1fb2838 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Handle CPP properly in Backpack

Previously, we attempted to lookup 'hole' packages for
include directories; this obviously is not going to work.
Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <>

Test Plan: validate

Reviewers: ekmett, bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14525

Differential Revision:
parent 69987720
......@@ -1892,8 +1892,14 @@ listVisibleModuleNames dflags =
getPreloadPackagesAnd :: DynFlags -> [PreloadUnitId] -> IO [PackageConfig]
getPreloadPackagesAnd dflags pkgids0 =
pkgids = pkgids0 ++ map (toInstalledUnitId . moduleUnitId . snd)
(thisUnitIdInsts dflags)
pkgids = pkgids0 ++
-- An indefinite package will have insts to HOLE,
-- which is not a real package. Don't look it up.
-- Fixes #14525
if isIndefinite dflags
then []
else map (toInstalledUnitId . moduleUnitId . snd)
(thisUnitIdInsts dflags)
state = pkgState dflags
pkg_map = pkgIdMap state
preload = preloadPackages state
module P where
import H
y = x
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment