diff options
author | Paul Oliver <contact@pauloliver.dev> | 2025-09-07 19:23:37 +0000 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2025-09-07 19:49:03 +0000 |
commit | 89aab732dc3d484b99c0761728285bca6f6b1ba0 (patch) | |
tree | e2b4ca6656758dc9f398b9b1de2e6d92670b77df /hsm-cam/Test/Cam.hs | |
parent | ef0713cbd90d6b84da7ea67e6dfc1fe5ab5bff86 (diff) |
Diffstat (limited to 'hsm-cam/Test/Cam.hs')
-rw-r--r-- | hsm-cam/Test/Cam.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/hsm-cam/Test/Cam.hs b/hsm-cam/Test/Cam.hs index 5c8daf5..94d3b73 100644 --- a/hsm-cam/Test/Cam.hs +++ b/hsm-cam/Test/Cam.hs @@ -1,12 +1,17 @@ import Control.Monad (forM_) +import Data.Function ((&)) import Effectful (runEff) import Effectful.FileSystem (runFileSystem) import Effectful.FileSystem.IO.ByteString.Lazy (writeFile) import Hsm.Cam (capturePng, runCam) -import Hsm.Log (Severity(Info, Trace), runLog) +import Hsm.Log (Severity (Info, Trace), runLog) import Prelude hiding (writeFile) main :: IO () main = - runEff . runFileSystem . runLog @"cam" Trace . runLog @"libcamera" Info . runCam . forM_ [0 .. 31] $ \index -> - capturePng >>= writeFile ("/tmp/hsm-cam-test" <> show @Int index <> ".png") + forM_ [0 .. 31] (\index -> capturePng >>= writeFile ("/tmp/hsm-cam-test" <> show @Int index <> ".png")) + & runCam + & runLog @"cam" Trace + & runLog @"libcamera" Info + & runFileSystem + & runEff |