From 65fee7694dca6f7e4aeb093c734f4edbc15cbc93 Mon Sep 17 00:00:00 2001 From: Lennart Spitzner Date: Tue, 6 Sep 2016 14:50:16 +0200 Subject: [PATCH] Add commandline param for input (without --input) --- src-brittany/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src-brittany/Main.hs b/src-brittany/Main.hs index a5432e6..a8db774 100644 --- a/src-brittany/Main.hs +++ b/src-brittany/Main.hs @@ -72,6 +72,7 @@ mainCmdParser = do suppressOutput <- addSimpleBoolFlag "" ["suppress-output"] (flagHelp $ parDoc "suppress the regular output, i.e. the transformed haskell source") _verbosity <- addSimpleCountFlag "v" ["verbose"] (flagHelp $ parDoc "[currently without effect; TODO]") reorderStop + inputParam <- addStringParamOpt "PATH" (paramHelpStr "path to input haskell source file") desc <- peekCmdDesc addCmdImpl $ void $ do when printVersion $ do @@ -83,7 +84,7 @@ mainCmdParser = do when printHelp $ do liftIO $ print $ ppHelpShallow desc System.Exit.exitSuccess - inputPathM <- case inputPaths of + inputPathM <- case maybeToList inputParam ++ inputPaths of [] -> do return Nothing [x] -> return $ Just x