diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-07 22:39:05 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-07 22:39:05 +0200 |
commit | 83838ea952146a742b2cf5e97b287d9cbeef8c61 (patch) | |
tree | 81654899be0868978737b4b62de0060aa1799f65 | |
parent | 41111d7e0b05f5bd6f17a25ac2abd604944440c1 (diff) | |
download | trivmix-83838ea952146a742b2cf5e97b287d9cbeef8c61.tar trivmix-83838ea952146a742b2cf5e97b287d9cbeef8c61.tar.gz trivmix-83838ea952146a742b2cf5e97b287d9cbeef8c61.tar.bz2 trivmix-83838ea952146a742b2cf5e97b287d9cbeef8c61.tar.xz trivmix-83838ea952146a742b2cf5e97b287d9cbeef8c61.zip |
Made input & output optional
-rw-r--r-- | src/Trivmix.hs | 16 | ||||
-rw-r--r-- | trivmix.cabal | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/Trivmix.hs b/src/Trivmix.hs index 2d6a50a..a754e76 100644 --- a/src/Trivmix.hs +++ b/src/Trivmix.hs | |||
@@ -37,12 +37,16 @@ data Options = Options | |||
37 | 37 | ||
38 | optionParser :: Parser Options | 38 | optionParser :: Parser Options |
39 | optionParser = Options <$> | 39 | optionParser = Options <$> |
40 | strOption ( long "input" | 40 | (fromMaybe "in" <$> optional (strOption ( long "input" |
41 | <> metavar "STRING" | 41 | <> metavar "STRING" |
42 | ) | 42 | ) |
43 | <*> strOption ( long "output" | 43 | ) |
44 | <> metavar "STRING" | 44 | ) |
45 | ) | 45 | <*> (fromMaybe "out" <$> optional (strOption ( long "output" |
46 | <> metavar "STRING" | ||
47 | ) | ||
48 | ) | ||
49 | ) | ||
46 | <*> strOption ( long "client" | 50 | <*> strOption ( long "client" |
47 | <> metavar "STRING" | 51 | <> metavar "STRING" |
48 | ) | 52 | ) |
diff --git a/trivmix.cabal b/trivmix.cabal index c90aae4..a871a9d 100644 --- a/trivmix.cabal +++ b/trivmix.cabal | |||
@@ -2,7 +2,7 @@ | |||
2 | -- documentation, see http://haskell.org/cabal/users-guide/ | 2 | -- documentation, see http://haskell.org/cabal/users-guide/ |
3 | 3 | ||
4 | name: trivmix | 4 | name: trivmix |
5 | version: 1.0.0 | 5 | version: 1.1.0 |
6 | -- synopsis: | 6 | -- synopsis: |
7 | -- description: | 7 | -- description: |
8 | license: PublicDomain | 8 | license: PublicDomain |