diff options
author | Paul Oliver <contact@pauloliver.dev> | 2025-09-05 00:13:52 +0000 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2025-09-05 00:32:06 +0000 |
commit | 8f9eceffae1d0e4eb0b2fbcb22b70730bb75bd5e (patch) | |
tree | 3d2b1c487a9d547c34bdf7afea72e73d92c78584 /hsm-web/Main.hs | |
parent | cd217ecf5bc7a04c9d594876f753916a098bf3b7 (diff) |
Adds optparse helper to `hsm-core`
Diffstat (limited to 'hsm-web/Main.hs')
-rw-r--r-- | hsm-web/Main.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hsm-web/Main.hs b/hsm-web/Main.hs index d1a9da3..2661370 100644 --- a/hsm-web/Main.hs +++ b/hsm-web/Main.hs @@ -2,6 +2,7 @@ import Effectful (runEff) import Hsm.Cam (runCam) +import Hsm.Core.Options (getOptions) import Hsm.Log (Severity(Info), runLogsOpt) import Hsm.Log.Options (makeLoggerOptionParser) import Hsm.Web (runServer, runWeb) @@ -15,6 +16,4 @@ type Loggers = '[ "cam", "libcamera", "scotty", "web"] $(makeLoggerOptionParser @Loggers "Options" "parser" 'Info) main :: IO () -main = do - opt <- execParser . info (parser <**> helper) $ fullDesc <> progDesc "Launch HsMouse Web Server" - runEff . runLogsOpt @Options @Loggers opt . runCam . runWeb $ runServer +main = getOptions parser "Launch HsMouse Web Server" >>= \opts -> runEff . runLogsOpt @Options @Loggers opts . runCam . runWeb $ runServer |