globalOptsParser :: GlobalOptsContext -> Maybe LogLevel -> Parser GlobalOptsMonoid
globalOptsParser kind defLogLevel =
    GlobalOptsMonoid <$>
    optional (strOption (long Docker.reExecArgName <> hidden <> internal)) <*>
    optional (option auto (long dockerEntrypointArgName <> hidden <> internal)) <*>
    logLevelOptsParser hide0 defLogLevel <*>
    configOptsParser hide0 <*>
    optional (abstractResolverOptsParser hide0) <*>
    optional (compilerOptsParser hide0) <*>
    maybeBoolFlags
        "terminal"
        "overriding terminal detection in the case of running in a false terminal"
        hide <*>
    optional (strOption (long "stack-yaml" <>
                         metavar "STACK-YAML" <>
                         help ("Override project stack.yaml file " <>
                               "(overrides any STACK_YAML environment variable)") <>
                         hide))
  where
    hide = hideMods hide0
    hide0 = kind /= OuterGlobalOpts

-- | Create GlobalOpts from GlobalOptsMonoid.
globalOptsParser :: GlobalOptsContext -> Maybe LogLevel -> Parser GlobalOptsMonoid
globalOptsParser kind defLogLevel =
    GlobalOptsMonoid <$>
    optional (strOption (long Docker.reExecArgName <> hidden <> internal)) <*>
    optional (option auto (long dockerEntrypointArgName <> hidden <> internal)) <*>
    logLevelOptsParser hide0 defLogLevel <*>
    configOptsParser hide0 <*>
    optional (abstractResolverOptsParser hide0) <*>
    optional (compilerOptsParser hide0) <*>
    maybeBoolFlags
        "terminal"
        "overriding terminal detection in the case of running in a false terminal"
        hide <*>
    optional (strOption (long "stack-yaml" <>
                         metavar "STACK-YAML" <>
                         help ("Override project stack.yaml file " <>
                               "(overrides any STACK_YAML environment variable)") <>
                         hide))
  where
    hide = hideMods hide0
    hide0 = kind /= OuterGlobalOpts

-- | Create GlobalOpts from GlobalOptsMonoid.
globalOptsParser kind defLogLevel =
    GlobalOptsMonoid <$>
    optional (strOption (long Docker.reExecArgName <> hidden <> internal)) <*>
    optional (option auto (long dockerEntrypointArgName <> hidden <> internal)) <*>
    logLevelOptsParser hide0 defLogLevel <*>
    configOptsParser hide0 <*>
    optional (abstractResolverOptsParser hide0) <*>
    optional (compilerOptsParser hide0) <*>
    maybeBoolFlags
        "terminal"
        "overriding terminal detection in the case of running in a false terminal"
        hide <*>
    optional (strOption (long "stack-yaml" <>
                         metavar "STACK-YAML" <>
                         help ("Override project stack.yaml file " <>
                               "(overrides any STACK_YAML environment variable)") <>
                         hide))
  where
    hide = hideMods hide0
    hide0 = kind /= OuterGlobalOpts

-- | Create GlobalOpts from GlobalOptsMonoid.