From a0c172c871f404f268850fd22ef90268576b0cc6 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 28 Aug 2025 13:37:39 +0000 Subject: Enforces not using `IOE` on `test-cam` application code --- hsm-cam/Test/Cam.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'hsm-cam/Test/Cam.hs') 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") -- cgit v1.2.1