aboutsummaryrefslogtreecommitdiffstats
path: root/src/CliOptions.hs
diff options
context:
space:
mode:
authorTeddy Wing2017-08-20 18:17:54 +0200
committerTeddy Wing2017-08-20 18:17:54 +0200
commit5792fb1fc1439994a4877761820d8d034b66110d (patch)
tree37209d27856028dc320acf85103bc601ce1d281a /src/CliOptions.hs
parentb8d535020feeea4233306c2063f19c25f383384f (diff)
downloadsorbot-5792fb1fc1439994a4877761820d8d034b66110d.tar.bz2
CliOptions(parseOptions): Return options
Make the parsed options accessible to the rest of the program.
Diffstat (limited to 'src/CliOptions.hs')
-rw-r--r--src/CliOptions.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/CliOptions.hs b/src/CliOptions.hs
index b848e2b..60f05ad 100644
--- a/src/CliOptions.hs
+++ b/src/CliOptions.hs
@@ -1,5 +1,7 @@
module CliOptions
- ( parseOptions
+ ( Options(..)
+
+ , parseOptions
) where
import Data.Semigroup ((<>))
@@ -24,10 +26,9 @@ options = Options
<> value "en"
<> help "Set the language Sorbot will speak in (en | fr)" )
-parseOptions :: IO ()
+parseOptions :: IO Options
parseOptions = do
execParser opts
- return ()
where
opts = info (options <**> helper)
( fullDesc