diff options
author | Joris | 2016-07-14 11:57:12 +0000 |
---|---|---|
committer | Joris | 2016-07-14 12:00:05 +0000 |
commit | 69e69017b75d1cdaa1fd2aef2818de5111b29735 (patch) | |
tree | 99dba8f67dc1c55b2cc22f33f81c59c7355b337b /src/Main.hs | |
parent | 04f9a66c66ca137d9fee6ccca228c41fec960fe0 (diff) |
Update code and fix parsers
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/Main.hs b/src/Main.hs index f38646b..27dcfa5 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -6,16 +6,15 @@ module Main import qualified Data.Text.IO as T -import AdListener (listenToNewAds) +import qualified AdListener -import Config (Config) -import qualified Config as C +import qualified Conf main :: IO () main = do - maybeConfig <- C.getConfig - case maybeConfig of - Just config -> - listenToNewAds config - Nothing -> - T.putStrLn C.configUsage + eitherConfig <- Conf.parse "application.conf" + case eitherConfig of + Right config -> + AdListener.start config + Left message -> + T.putStrLn message |