aboutsummaryrefslogtreecommitdiff
path: root/hsm-cam/Test/Cam.hs
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2025-08-28 13:37:39 +0000
committerPaul Oliver <contact@pauloliver.dev>2025-08-28 19:57:06 +0000
commita0c172c871f404f268850fd22ef90268576b0cc6 (patch)
treecedf100bafc7794bdb8cab516a597271715b61b3 /hsm-cam/Test/Cam.hs
parent0e7fd0dde11e1724de6ae40d77981b93ddb56ef8 (diff)
Enforces not using `IOE` on `test-cam` application code
Diffstat (limited to 'hsm-cam/Test/Cam.hs')
-rw-r--r--hsm-cam/Test/Cam.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/hsm-cam/Test/Cam.hs b/hsm-cam/Test/Cam.hs
index fc56b6c..5c8daf5 100644
--- a/hsm-cam/Test/Cam.hs
+++ b/hsm-cam/Test/Cam.hs
@@ -1,11 +1,12 @@
import Control.Monad (forM_)
-import Data.ByteString.Lazy (writeFile)
-import Effectful (liftIO, runEff)
+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 Prelude hiding (writeFile)
main :: IO ()
main =
- runEff . runLog @"cam" Trace . runLog @"libcamera" Info . runCam . forM_ [0 .. 31] $ \index ->
- capturePng >>= liftIO . writeFile ("/tmp/hsm-cam-test" <> show @Int index <> ".png")
+ runEff . runFileSystem . runLog @"cam" Trace . runLog @"libcamera" Info . runCam . forM_ [0 .. 31] $ \index ->
+ capturePng >>= writeFile ("/tmp/hsm-cam-test" <> show @Int index <> ".png")