summaryrefslogtreecommitdiff
path: root/src/Trivstream/Options.hs
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-08-02 22:46:52 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-08-02 22:46:52 +0200
commit3989c89f0f3945f949d2929cc0af3994910a2771 (patch)
tree9c656c781ec4fa054befa4b9e0b2c2d671fc9170 /src/Trivstream/Options.hs
parentf31a65bcd1642b3f042bd906674f4064cfc9362c (diff)
downloadtrivstream-3989c89f0f3945f949d2929cc0af3994910a2771.tar
trivstream-3989c89f0f3945f949d2929cc0af3994910a2771.tar.gz
trivstream-3989c89f0f3945f949d2929cc0af3994910a2771.tar.bz2
trivstream-3989c89f0f3945f949d2929cc0af3994910a2771.tar.xz
trivstream-3989c89f0f3945f949d2929cc0af3994910a2771.zip
minor cleanupHEADmaster
Diffstat (limited to 'src/Trivstream/Options.hs')
-rw-r--r--src/Trivstream/Options.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Trivstream/Options.hs b/src/Trivstream/Options.hs
index a777942..1762f60 100644
--- a/src/Trivstream/Options.hs
+++ b/src/Trivstream/Options.hs
@@ -8,6 +8,7 @@ module Trivstream.Options
8import Trivstream.Types 8import Trivstream.Types
9import Trivstream.Options.Utils 9import Trivstream.Options.Utils
10import Paths_trivstream (version) 10import Paths_trivstream (version)
11import Development.GitRev
11 12
12 13
13import Options.Applicative 14import Options.Applicative
@@ -16,7 +17,7 @@ import Control.Monad.Reader
16import Control.Monad.IO.Class 17import Control.Monad.IO.Class
17 18
18 19
19withOptions :: MonadIO m => ReaderT Configuration a -> IO a 20withOptions :: MonadIO m => ReaderT Configuration m a -> m a
20withOptions f = liftIO (execParser options) >>= runReaderT f 21withOptions f = liftIO (execParser options) >>= runReaderT f
21 where 22 where
22 options = options' `info` mconcat [ header $ concat [ "trivstream " 23 options = options' `info` mconcat [ header $ concat [ "trivstream "