@@ -75,9 +75,7 @@ import Distribution.Client.RebuildMonad
75
75
( runRebuild
76
76
)
77
77
import Distribution.Client.Setup
78
- ( CommonSetupFlags (.. )
79
- , ConfigFlags (.. )
80
- , GlobalFlags (.. )
78
+ ( GlobalFlags (.. )
81
79
)
82
80
import Distribution.Client.TargetSelector
83
81
( TargetSelectorProblem (.. )
@@ -177,9 +175,6 @@ import Distribution.Types.UnqualComponentName
177
175
import Distribution.Utils.NubList
178
176
( fromNubList
179
177
)
180
- import Distribution.Verbosity
181
- ( normal
182
- )
183
178
import Language.Haskell.Extension
184
179
( Language (.. )
185
180
)
@@ -281,7 +276,8 @@ data TargetContext
281
276
-- In the case that the context refers to a temporary directory,
282
277
-- delete it after the action finishes.
283
278
withContextAndSelectors
284
- :: AcceptNoTargets
279
+ :: Verbosity
280
+ -> AcceptNoTargets
285
281
-- ^ What your command should do when no targets are found.
286
282
-> Maybe ComponentKind
287
283
-- ^ A target filter
@@ -296,7 +292,7 @@ withContextAndSelectors
296
292
-> (TargetContext -> ProjectBaseContext -> [TargetSelector ] -> IO b )
297
293
-- ^ The body of your command action.
298
294
-> IO b
299
- withContextAndSelectors noTargets kind flags@ NixStyleFlags {.. } targetStrings globalFlags cmd act =
295
+ withContextAndSelectors verbosity noTargets kind flags@ NixStyleFlags {.. } targetStrings globalFlags cmd act =
300
296
withTemporaryTempDirectory $ \ mkTmpDir -> do
301
297
(tc, ctx) <-
302
298
withProjectOrGlobalConfig
@@ -337,7 +333,6 @@ withContextAndSelectors noTargets kind flags@NixStyleFlags{..} targetStrings glo
337
333
338
334
act tc' ctx' sels
339
335
where
340
- verbosity = fromFlagOrDefault normal (setupVerbosity $ configCommonFlags configFlags)
341
336
ignoreProject = flagIgnoreProject projectFlags
342
337
cliConfig = commandLineFlagsToProjectConfig globalFlags flags mempty
343
338
globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig)
0 commit comments