fetchAction :: FetchFlags -> [String] -> Action
fetchAction fetchFlags extraArgs globalFlags = do
  let verbosity = fromFlag (fetchVerbosity fetchFlags)
  targets <- readUserTargets verbosity extraArgs
  config <- loadConfig verbosity (globalConfigFile globalFlags)
  let configFlags  = savedConfigureFlags config
      globalFlags' = savedGlobalFlags config `mappend` globalFlags
  (comp, platform, conf) <- configCompilerAux' configFlags
  withGlobalRepos verbosity globalFlags' $ \globalRepos ->
    fetch verbosity
        (configPackageDB' configFlags)
        globalRepos
        comp platform conf globalFlags' fetchFlags
        targets
fetchAction :: FetchFlags -> [String] -> Action
fetchAction fetchFlags extraArgs globalFlags = do
  let verbosity = fromFlag (fetchVerbosity fetchFlags)
  targets <- readUserTargets verbosity extraArgs
  config <- loadConfig verbosity (globalConfigFile globalFlags)
  let configFlags  = savedConfigureFlags config
      globalFlags' = savedGlobalFlags config `mappend` globalFlags
  (comp, platform, conf) <- configCompilerAux' configFlags
  withGlobalRepos verbosity globalFlags' $ \globalRepos ->
    fetch verbosity
        (configPackageDB' configFlags)
        globalRepos
        comp platform conf globalFlags' fetchFlags
        targets
fetchAction fetchFlags extraArgs globalFlags = do
  let verbosity = fromFlag (fetchVerbosity fetchFlags)
  targets <- readUserTargets verbosity extraArgs
  config <- loadConfig verbosity (globalConfigFile globalFlags)
  let configFlags  = savedConfigureFlags config
      globalFlags' = savedGlobalFlags config `mappend` globalFlags
  (comp, platform, conf) <- configCompilerAux' configFlags
  withGlobalRepos verbosity globalFlags' $ \globalRepos ->
    fetch verbosity
        (configPackageDB' configFlags)
        globalRepos
        comp platform conf globalFlags' fetchFlags
        targets