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.hs17
1 files changed, 15 insertions, 2 deletions
diff --git a/hsm-web/Main.hs b/hsm-web/Main.hs
index 0ec780e..0eb5237 100644
--- a/hsm-web/Main.hs
+++ b/hsm-web/Main.hs
@@ -1,20 +1,33 @@
+{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE TemplateHaskell #-}
import Data.Function ((&))
import Effectful (runEff)
+import Effectful.Concurrent (runConcurrent)
+import Effectful.Fail (runFailIO)
import Hsm.Core.App (bootstrapAppNoEcho)
import Hsm.I2C (runI2C)
import Hsm.INA226 (runINA226)
import Hsm.Log (Severity (Info), runLogsOpt)
import Hsm.Log.Options (makeLoggerOptionParser)
+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 = '["i2c", "ina226", "scotty", "web"]
+type Logs = '["gst", "i2c", "ina226", "scotty", "stream", "web"]
$(makeLoggerOptionParser @Logs "Options" "parser" 'Info)
main :: IO ()
-main = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts -> runServer & runWeb & runINA226 & runI2C & runLogsOpt @Options @Logs opts & runEff
+main = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts ->
+ runServer
+ & runWeb
+ & runStream
+ & runINA226
+ & runI2C
+ & runLogsOpt @Options @Logs opts
+ & runConcurrent
+ & runFailIO
+ & runEff