From 8b5da14644cebcc432427bb206b45e171bb0a394 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Mon, 8 Apr 2024 13:25:16 +0300 Subject: [PATCH] foo --- src/HaskellCI.hs | 2 +- src/HaskellCI/Cli.hs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/HaskellCI.hs b/src/HaskellCI.hs index 7aa27ce8..6722686d 100644 --- a/src/HaskellCI.hs +++ b/src/HaskellCI.hs @@ -88,7 +88,7 @@ main = do CommandDumpConfig -> do putStr $ unlines $ runDG configGrammar - CommandDiffConfig _Nothing __Nothing -> do + CommandDiffConfig -> do let oldConfig = emptyConfig -- default newConfig' <- findConfigFile (optConfig opts) let newConfig = optConfigMorphism opts newConfig' diff --git a/src/HaskellCI/Cli.hs b/src/HaskellCI/Cli.hs index 5d0aa932..1f2872c5 100644 --- a/src/HaskellCI/Cli.hs +++ b/src/HaskellCI/Cli.hs @@ -26,7 +26,7 @@ data Command | CommandRegenerate | CommandListGHC | CommandDumpConfig - | CommandDiffConfig (Maybe FilePath) (Maybe FilePath) + | CommandDiffConfig | CommandVersionInfo deriving Show @@ -136,7 +136,7 @@ cliParserInfo = O.info ((,) <$> cmdP <*> optionsP O.<**> versionP O.<**> O.helpe , O.command "github" $ O.info githubP $ O.progDesc "Generate GitHub Actions config" , O.command "list-ghc" $ O.info (pure CommandListGHC) $ O.progDesc "List known GHC versions" , O.command "dump-config" $ O.info (pure CommandDumpConfig) $ O.progDesc "Dump cabal.haskell-ci config with default values" - , O.command "diff-config" $ O.info diffP $ O.progDesc "Diff between configuration files" + , O.command "diff-config" $ O.info diffP $ O.progDesc "Diff between default and current configuration" , O.command "version-info" $ O.info (pure CommandVersionInfo) $ O.progDesc "Print versions info haskell-ci was compiled with" ]) <|> travisP @@ -149,9 +149,7 @@ cliParserInfo = O.info ((,) <$> cmdP <*> optionsP O.<**> versionP O.<**> O.helpe githubP = CommandGitHub <$> O.strArgument (O.metavar "CABAL.FILE" <> O.action "file" <> O.help "Either or cabal.project") - diffP = CommandDiffConfig - <$> O.optional (O.strArgument (O.metavar "FILE" <> O.action "file" <> O.help "Either a generated CI file or Haskell-CI config file.")) - <*> O.optional (O.strArgument (O.metavar "FILE" <> O.action "file" <> O.help "Either a generated CI file or Haskell-CI config file.")) + diffP = pure CommandDiffConfig ------------------------------------------------------------------------------- -- Parsing helpers