Add CLI and configurable configuration

This commit is contained in:
1computer1 2019-07-11 01:00:41 -04:00
parent 07bbc86744
commit 8e246c8851
4 changed files with 31 additions and 7 deletions

View file

@ -67,12 +67,12 @@ type MyriadT m = ReaderT Env (LoggingT m)
type MonadWithIO m = (MonadIO m, MonadBase IO m, MonadBaseControl IO m)
readConfig :: T.Text -> IO MyriadConfig
readConfig path = input auto path
readConfig = input auto
initEnv :: T.Text -> IO Env
initEnv path =
initEnv configInput =
Env
<$> readConfig path
<$> readConfig configInput
<*> newIORef M.empty
<*> newIORef M.empty
<*> newIORef M.empty