Minor fixup in Main.hs for next butcher release

pull/108/head
Lennart Spitzner 2018-01-13 18:31:39 +01:00
parent 37e355fea5
commit e788ac9afd
1 changed files with 6 additions and 6 deletions

View File

@ -140,16 +140,16 @@ mainCmdParser helpDesc = do
"" ""
["write-mode"] ["write-mode"]
"(display|inplace)" "(display|inplace)"
Flag ( flagHelp
{ _flag_help = Just $ PP.vcat ( PP.vcat
[ PP.text "display: output for any input(s) goes to stdout" [ PP.text "display: output for any input(s) goes to stdout"
, PP.text "inplace: override respective input file (without backup!)" , PP.text "inplace: override respective input file (without backup!)"
] ]
, _flag_default = Just Display )
} <> flagDefault Display
)
inputParams <- addParamNoFlagStrings "PATH" (paramHelpStr "paths to input haskell source files") inputParams <- addParamNoFlagStrings "PATH" (paramHelpStr "paths to input haskell source files")
reorderStop reorderStop
desc <- peekCmdDesc
addCmdImpl $ void $ do addCmdImpl $ void $ do
when printLicense $ do when printLicense $ do
print licenseDoc print licenseDoc
@ -161,7 +161,7 @@ mainCmdParser helpDesc = do
putStrLn $ "There is NO WARRANTY, to the extent permitted by law." putStrLn $ "There is NO WARRANTY, to the extent permitted by law."
System.Exit.exitSuccess System.Exit.exitSuccess
when printHelp $ do when printHelp $ do
liftIO $ print $ ppHelpShallow desc liftIO $ print $ ppHelpShallow helpDesc
System.Exit.exitSuccess System.Exit.exitSuccess
let inputPaths = if null inputParams then [Nothing] else map Just inputParams let inputPaths = if null inputParams then [Nothing] else map Just inputParams