@@ -76,9 +76,7 @@ import Distribution.Client.RebuildMonad
7676 ( runRebuild
7777 )
7878import Distribution.Client.Setup
79- ( CommonSetupFlags (.. )
80- , ConfigFlags (.. )
81- , GlobalFlags (.. )
79+ ( GlobalFlags (.. )
8280 )
8381import Distribution.Client.TargetSelector
8482 ( TargetSelectorProblem (.. )
@@ -177,9 +175,6 @@ import Distribution.Types.UnqualComponentName
177175import Distribution.Utils.NubList
178176 ( fromNubList
179177 )
180- import Distribution.Verbosity
181- ( normal
182- )
183178import Language.Haskell.Extension
184179 ( Language (.. )
185180 )
@@ -281,7 +276,8 @@ data TargetContext
281276-- In the case that the context refers to a temporary directory,
282277-- delete it after the action finishes.
283278withContextAndSelectors
284- :: AcceptNoTargets
279+ :: Verbosity
280+ -> AcceptNoTargets
285281 -- ^ What your command should do when no targets are found.
286282 -> Maybe ComponentKind
287283 -- ^ A target filter
@@ -296,7 +292,7 @@ withContextAndSelectors
296292 -> (TargetContext -> ProjectBaseContext -> [TargetSelector ] -> IO b )
297293 -- ^ The body of your command action.
298294 -> IO b
299- withContextAndSelectors noTargets kind flags@ NixStyleFlags {.. } targetStrings globalFlags cmd act =
295+ withContextAndSelectors verbosity noTargets kind flags@ NixStyleFlags {.. } targetStrings globalFlags cmd act =
300296 withTemporaryTempDirectory $ \ mkTmpDir -> do
301297 (tc, ctx) <-
302298 withProjectOrGlobalConfig
@@ -337,7 +333,6 @@ withContextAndSelectors noTargets kind flags@NixStyleFlags{..} targetStrings glo
337333
338334 act tc' ctx' sels
339335 where
340- verbosity = fromFlagOrDefault normal (setupVerbosity $ configCommonFlags configFlags)
341336 ignoreProject = flagIgnoreProject projectFlags
342337 cliConfig = commandLineFlagsToProjectConfig globalFlags flags mempty
343338 globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig)
0 commit comments