Skip to content

Commit

Permalink
Include only the package deps in ghci
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdone committed Jun 24, 2015
1 parent a2fdff5 commit 2354251
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Stack/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ generatePkgDescOpts cabalfp pkg = do
else Nothing
return
(nub
(concatMap
(["-hide-all-packages"] ++
concatMap
(concatMap
(generateBuildInfoOpts mcabalmacros cabalDir distDir))
[ maybe [] (return . libBuildInfo) (library pkg)
Expand All @@ -291,8 +292,12 @@ generatePkgDescOpts cabalfp pkg = do
-- | Generate GHC options for the target.
generateBuildInfoOpts :: Maybe (Path Abs File) -> Path Abs Dir -> Path Abs Dir -> BuildInfo -> [String]
generateBuildInfoOpts mcabalmacros cabalDir distDir b =
nub (concat [ghcOpts b, extOpts b, srcOpts, macros])
nub (concat [ghcOpts b, extOpts b, srcOpts, macros, deps])
where
deps =
concat
[ ["-package=" <> display name]
| Dependency name _ <- targetBuildDepends b]
macros =
case mcabalmacros of
Nothing -> []
Expand Down

0 comments on commit 2354251

Please sign in to comment.