Skip to content

Commit dd6a6bc

Browse files
committed
Change to "stack ghci" cabal_macros.h munging
This way, CURRENT_PACKAGE_KEY will be undefined, causing an error, rather than just being the last set value.
1 parent a1987c8 commit dd6a6bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Stack/Ghci.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ preprocessCabalMacros pkgs out = liftIO $ do
490490
let fps = nubOrd (concatMap (mapMaybe (bioCabalMacros . snd) . ghciPkgOpts) pkgs)
491491
files <- mapM (S8.readFile . toFilePath) fps
492492
if null files then return [] else do
493-
S8.writeFile (toFilePath out) $ S8.intercalate "\n#undef CURRENT_PACKAGE_KEY\n" files
493+
S8.writeFile (toFilePath out) $ S8.concat $ map (<> "\n#undef CURRENT_PACKAGE_KEY\n") files
494494
return ["-optP-include", "-optP" <> toFilePath out]
495495

496496
setScriptPerms :: MonadIO m => FilePath -> m ()

0 commit comments

Comments
 (0)