@@ -21,7 +21,8 @@ import Distribution.Helper (Package, projectPackages, pUnits,
21
21
unChModuleName , Ex (.. ), ProjLoc (.. ),
22
22
QueryEnv , mkQueryEnv , runQuery ,
23
23
Unit , unitInfo , uiComponents ,
24
- ChEntrypoint (.. ), UnitInfo (.. ))
24
+ ChEntrypoint (.. ), UnitInfo (.. ),
25
+ qePrograms , ghcProgram )
25
26
import Distribution.Helper.Discover (findProjects , getDefaultDistDir )
26
27
import Ide.Logger
27
28
import HIE.Bios as Bios
@@ -470,6 +471,7 @@ cabalHelperCradle file = do
470
471
, componentRoot = cwd
471
472
, componentDependencies = []
472
473
}
474
+ , runGhcCmd = \ args -> Bios. readProcessWithCwd cwd " ghc" args " "
473
475
}
474
476
}
475
477
Just (Ex proj) -> do
@@ -497,6 +499,7 @@ cabalHelperCradle file = do
497
499
, cradleOptsProg =
498
500
CradleAction { actionName = Bios. Other (projectNoneType proj)
499
501
, runCradle = \ _ _ -> return CradleNone
502
+ , runGhcCmd = \ _ -> pure CradleNone
500
503
}
501
504
}
502
505
Just realPackage -> do
@@ -517,6 +520,9 @@ cabalHelperCradle file = do
517
520
realPackage
518
521
normalisedPackageLocation
519
522
fp
523
+ , runGhcCmd = \ args -> do
524
+ let programs = qePrograms env
525
+ Bios. readProcessWithCwd normalisedPackageLocation (ghcProgram programs) args " "
520
526
}
521
527
}
522
528
@@ -558,6 +564,7 @@ cabalHelperAction proj env package root fp = do
558
564
Left err -> return
559
565
$ CradleFail
560
566
$ CradleError
567
+ []
561
568
(ExitFailure 2 )
562
569
err
563
570
0 commit comments