aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hsm-cam/Test/Cam.hs9
-rw-r--r--hsm-cam/hsm-cam.cabal1
2 files changed, 6 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")
diff --git a/hsm-cam/hsm-cam.cabal b/hsm-cam/hsm-cam.cabal
index fe767cb..892a5fe 100644
--- a/hsm-cam/hsm-cam.cabal
+++ b/hsm-cam/hsm-cam.cabal
@@ -43,6 +43,7 @@ executable test-cam
, base
, bytestring
, directory
+ , effectful
, effectful-core
, effectful-plugin
, hsm-core