blob: 6cbfa3101e95658c784e141df594b807d1e358da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE TemplateHaskell #-}
import Data.Function ((&))
import Effectful (runEff)
import Hsm.Cam (runCam)
import Hsm.Core.App (bootstrapAppNoEcho)
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 = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts -> runServer & runWeb & runCam & runLogsOpt @Options @Loggers opts & runEff
|