cleanOptsParser :: Parser CleanOpts
cleanOptsParser = CleanTargets <$> packages <|> CleanFull <$> doFullClean
  where
    packages =
        many
            (packageNameArgument
                 (metavar "PACKAGE" <>
                  help "If none specified, clean all local packages"))
    doFullClean =
        switch
            (long "full" <>
             help "Remove whole the work dir, default is .stack-work")

-- | Command-line arguments parser for configuration.
cleanOptsParser :: Parser CleanOpts
cleanOptsParser = CleanTargets <$> packages <|> CleanFull <$> doFullClean
  where
    packages =
        many
            (packageNameArgument
                 (metavar "PACKAGE" <>
                  help "If none specified, clean all local packages"))
    doFullClean =
        switch
            (long "full" <>
             help "Remove whole the work dir, default is .stack-work")

-- | Command-line arguments parser for configuration.
cleanOptsParser = CleanTargets <$> packages <|> CleanFull <$> doFullClean
  where
    packages =
        many
            (packageNameArgument
                 (metavar "PACKAGE" <>
                  help "If none specified, clean all local packages"))
    doFullClean =
        switch
            (long "full" <>
             help "Remove whole the work dir, default is .stack-work")

-- | Command-line arguments parser for configuration.