Change/Amend program/version description

pull/1/head
Lennart Spitzner 2016-07-30 15:43:06 +02:00
parent 60d1bc5176
commit e855b346b3
1 changed files with 17 additions and 7 deletions

View File

@ -53,12 +53,19 @@ mainCmdParser = do
addCmdSynopsis "haskell source pretty printer" addCmdSynopsis "haskell source pretty printer"
addCmdHelp $ PP.vcat $ List.intersperse (PP.text "") addCmdHelp $ PP.vcat $ List.intersperse (PP.text "")
[ parDoc $ "Transforms one haskell module by reformatting" [ parDoc $ "Transforms one haskell module by reformatting"
++ " (parts of) the source code, while preserving the" ++ " (parts of) the source code (while preserving the"
++ " parts not transformed." ++ " parts not transformed)."
++ " Especially, comments are preserved completely" , parDoc $ "Based on ghc-exactprint, thus (theoretically) supporting all"
++ " and newlines are in many cases." ++ " that ghc does."
, parDoc $ "Based on ghc-exactprint, thus supporting all that" , parDoc $ "This is an early, experimental release. Some flags currently"
++ " ghc does." ++ " won't be parsed correctly or will have no effect."
++ " Only type-signatures and function-bindings are transformed."
++ " The output may"
++ " not be valid haskell if you run into some unfixed bug."
++ " (And yes, i should include automatic checking for that..)"
, parDoc $ "See https://github.com/lspitzner/brittany"
, parDoc $ "Please report bugs at"
++ " https://github.com/lspitzner/brittany/issues"
] ]
-- addCmd "debugArgs" $ do -- addCmd "debugArgs" $ do
addHelpCommand addHelpCommand
@ -76,7 +83,10 @@ mainCmdParser = do
desc <- peekCmdDesc desc <- peekCmdDesc
addCmdImpl $ void $ do addCmdImpl $ void $ do
when printVersion $ do when printVersion $ do
liftIO $ putStrLn $ "brittany version " ++ showVersion version liftIO $ do
putStrLn $ "brittany version " ++ showVersion version
putStrLn $ "Copyright (C) 2016 Lennart Spitzner"
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 desc