blob: 2661370e7de96ed6cc8023a3e51dc229840fb394 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE TemplateHaskell #-}
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)
-- Import full module for cleaner `-ddump-splices` output
-- Avoids package/module qualifiers in generated code
import Options.Applicative
type Loggers = '[ "cam", "libcamera", "scotty", "web"]
$(makeLoggerOptionParser @Loggers "Options" "parser" 'Info)
main :: IO ()
main = getOptions parser "Launch HsMouse Web Server" >>= \opts -> runEff . runLogsOpt @Options @Loggers opts . runCam . runWeb $ runServer
|