From 26303e51d4270f296880b8daf1107444bd22e35d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 21 Jun 2015 21:20:28 +0200 Subject: Better docs --- trivmix.cabal | 2 +- trivmix.nix | 2 +- trivmix/Trivmix.hs | 25 +++++++++++++------------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/trivmix.cabal b/trivmix.cabal index 3dd339a..fd96124 100644 --- a/trivmix.cabal +++ b/trivmix.cabal @@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: trivmix -version: 2.6.0 +version: 2.6.1 -- synopsis: -- description: license: PublicDomain diff --git a/trivmix.nix b/trivmix.nix index 82d4781..be0b676 100644 --- a/trivmix.nix +++ b/trivmix.nix @@ -6,7 +6,7 @@ cabal.mkDerivation (self: { pname = "trivmix"; - version = "2.6.0"; + version = "2.6.1"; src = ./.; isLibrary = true; isExecutable = true; diff --git a/trivmix/Trivmix.hs b/trivmix/Trivmix.hs index 9f0cf22..8cfa1b6 100644 --- a/trivmix/Trivmix.hs +++ b/trivmix/Trivmix.hs @@ -46,26 +46,27 @@ data Options = Options } optionParser :: Parser Options -optionParser = Options <$> - (fromMaybe "in" <$> optional (strOption ( long "input" - <> metavar "STRING" - ) - ) - ) - <*> (fromMaybe "out" <$> optional (strOption ( long "output" - <> metavar "STRING" - ) - ) - ) +optionParser = Options + <$> strOption ( long "input" + <> metavar "STRING" + <> value "in" + <> showDefault + ) + <*> strOption ( long "output" + <> metavar "STRING" + <> value "out" + <> showDefault + ) <*> strOption ( long "client" <> metavar "STRING" ) <*> optional ( strOption ( long "run" <> metavar "FILE" + <> help "Execute a file once setup of jacks is done (use this to autoconnect)" ) ) <*> some (strArgument ( metavar "FILE..." - <> help "Files that contain levels to assume and synchronize" + <> help "Files that contain levels to assume and synchronize — For deterministic behaviour use flock(2)" ) ) -- cgit v1.2.3