@@ -35,6 +35,8 @@ import Distribution.Client.ProjectConfig
35
35
import Distribution.Client.ProjectOrchestration
36
36
import Distribution.Client.ProjectPlanning
37
37
( ElaboratedSharedConfig (.. ), ElaboratedInstallPlan )
38
+ import Distribution.Client.ProjectPlanning.Types
39
+ ( elabOrderExeDependencies )
38
40
import Distribution.Client.RebuildMonad
39
41
( runRebuild )
40
42
import Distribution.Client.Setup
@@ -407,14 +409,20 @@ addDepsToProjectTarget deps pkgId ctx =
407
409
generateReplFlags :: Bool -> ElaboratedInstallPlan -> OriginalComponentInfo -> ReplFlags
408
410
generateReplFlags includeTransitive elaboratedPlan OriginalComponentInfo {.. } = flags
409
411
where
412
+ exeDeps :: [UnitId ]
413
+ exeDeps =
414
+ foldMap
415
+ (InstallPlan. foldPlanPackage (const [] ) elabOrderExeDependencies)
416
+ (InstallPlan. dependencyClosure elaboratedPlan [ociUnitId])
417
+
410
418
deps , deps' , trans , trans' :: [UnitId ]
411
419
flags :: ReplFlags
412
420
deps = installedUnitId <$> InstallPlan. directDeps elaboratedPlan ociUnitId
413
421
deps' = deps \\ ociOriginalDeps
414
422
trans = installedUnitId <$> InstallPlan. dependencyClosure elaboratedPlan deps'
415
423
trans' = trans \\ ociOriginalDeps
416
- flags = ( " -package-id " ++ ) . prettyShow <$>
417
- if includeTransitive then trans' else deps'
424
+ flags = fmap (( " -package-id " ++ ) . prettyShow) . ( \\ exeDeps)
425
+ $ if includeTransitive then trans' else deps'
418
426
419
427
-- | This defines what a 'TargetSelector' means for the @repl@ command.
420
428
-- It selects the 'AvailableTarget's that the 'TargetSelector' refers to,
0 commit comments