aboutsummaryrefslogtreecommitdiff
path: root/hsm-web/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hsm-web/Main.hs')
-rw-r--r--hsm-web/Main.hs29
1 files changed, 18 insertions, 11 deletions
diff --git a/hsm-web/Main.hs b/hsm-web/Main.hs
index 0eb5237..6a9b452 100644
--- a/hsm-web/Main.hs
+++ b/hsm-web/Main.hs
@@ -6,28 +6,35 @@ import Effectful (runEff)
import Effectful.Concurrent (runConcurrent)
import Effectful.Fail (runFailIO)
import Hsm.Core.App (bootstrapAppNoEcho)
+import Hsm.Drive (runDrive)
+import Hsm.GPIO (runGPIO)
import Hsm.I2C (runI2C)
import Hsm.INA226 (runINA226)
import Hsm.Log (Severity (Info), runLogsOpt)
import Hsm.Log.Options (makeLoggerOptionParser)
+import Hsm.PWM (runPWM)
import Hsm.Stream (runStream)
import Hsm.Web (runServer, runWeb)
-- Import full module for cleaner `-ddump-splices` output
-- Avoids package/module qualifiers in generated code
import Options.Applicative
-type Logs = '["gst", "i2c", "ina226", "scotty", "stream", "web"]
+type Logs = '["drive", "gpio", "gst", "i2c", "ina226", "pwm", "scotty", "stream", "web"]
$(makeLoggerOptionParser @Logs "Options" "parser" 'Info)
main :: IO ()
-main = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts ->
- runServer
- & runWeb
- & runStream
- & runINA226
- & runI2C
- & runLogsOpt @Options @Logs opts
- & runConcurrent
- & runFailIO
- & runEff
+main =
+ bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts ->
+ runServer
+ & runWeb
+ & runStream
+ & runINA226
+ & runI2C
+ & runDrive
+ & runGPIO @"hsm-web"
+ & runPWM
+ & runLogsOpt @Options @Logs opts
+ & runConcurrent
+ & runFailIO
+ & runEff