diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2021-02-16 13:11:37 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2021-02-16 13:11:37 +0300 |
commit | 7f59fd16534fc4fe417640130c415107008a638c (patch) | |
tree | b1dd2f6954f6590c3cd546c5548b26ab3ec1f105 /Main.hs | |
parent | 97bbb430e4f1460858b2f1baaffc2ef804c63086 (diff) | |
download | suem-7f59fd16534fc4fe417640130c415107008a638c.tar suem-7f59fd16534fc4fe417640130c415107008a638c.tar.xz suem-7f59fd16534fc4fe417640130c415107008a638c.zip |
Now Machine is in Emulator which is a monad. =)
Diffstat (limited to 'Main.hs')
-rw-r--r-- | Main.hs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |