aboutsummaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Main.hs b/Main.hs
index 05610ed..ca9c155 100644
--- a/Main.hs
+++ b/Main.hs
@@ -1,8 +1,10 @@
+-- This module parses config as passed in arguments and runs Emulator.
module Main where
import Options.Applicative
import Suem
+
inet_socket :: String -> Parser ConfigSocket
inet_socket sock = ConfigInet <$> strOption
( long ("i" ++ sock)
@@ -18,6 +20,7 @@ unix_socket sock = ConfigUnix <$> strOption
socket :: String -> Parser (Maybe ConfigSocket)
socket sock = optional (inet_socket sock <|> unix_socket sock)
+
config :: Parser Config
config = Config
<$> option auto