@@ -500,27 +500,28 @@ configureCompiler
500
500
)
501
501
$ do
502
502
liftIO $ info verbosity " Compiler settings changed, reconfiguring..."
503
- let extraPath = fromNubList packageConfigProgramPathExtra
504
- -- Add paths in the local config
505
- progdb <- liftIO $ prependProgramSearchPath verbosity extraPath [] defaultProgramDb
506
- -- Add paths in the global config
507
- progdb' <- liftIO $ prependProgramSearchPath verbosity (fromNubList projectConfigProgPathExtra) [] progdb
508
- let progdb'' = userSpecifyPaths (Map. toList (getMapLast packageConfigProgramPaths)) progdb'
509
- result@ (_, _, progdb''') <-
503
+ progdb <-
504
+ liftIO $
505
+ -- Add paths in the global config
506
+ prependProgramSearchPath verbosity (fromNubList projectConfigProgPathExtra) [] defaultProgramDb
507
+ -- Add paths in the local config
508
+ >>= prependProgramSearchPath verbosity (fromNubList packageConfigProgramPathExtra) []
509
+ >>= pure . userSpecifyPaths (Map. toList (getMapLast packageConfigProgramPaths))
510
+ result@ (_, _, progdb') <-
510
511
liftIO $
511
512
Cabal. configCompilerEx
512
513
hcFlavor
513
514
hcPath
514
515
hcPkg
515
- progdb''
516
+ progdb
516
517
verbosity
517
518
-- Note that we added the user-supplied program locations and args
518
519
-- for /all/ programs, not just those for the compiler prog and
519
520
-- compiler-related utils. In principle we don't know which programs
520
521
-- the compiler will configure (and it does vary between compilers).
521
522
-- We do know however that the compiler will only configure the
522
523
-- programs it cares about, and those are the ones we monitor here.
523
- monitorFiles (programsMonitorFiles progdb''' )
524
+ monitorFiles (programsMonitorFiles progdb')
524
525
525
526
-- Note: There is currently a bug here: we are dropping unconfigured
526
527
-- programs from the 'ProgramDb' when we re-use the cache created by
0 commit comments