From 8fe62292f18f4577303a868a8557b0486b218bcb Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Wed, 2 Jul 2025 15:06:35 +0200 Subject: Code now uses `effectful` to manage side-effects --- hsm-bin/Test/Status.hs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 hsm-bin/Test/Status.hs (limited to 'hsm-bin/Test/Status.hs') diff --git a/hsm-bin/Test/Status.hs b/hsm-bin/Test/Status.hs deleted file mode 100644 index 62ba4fa..0000000 --- a/hsm-bin/Test/Status.hs +++ /dev/null @@ -1,18 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - -import Control.IO.Region (region) -import Control.Monad.Loops (whileJust_) -import Hsm.GPIO (allocateGPIO) -import Hsm.Readline (allocateReadline, readline) -import Hsm.Status (StatusEnv, status, statusEnvDefault) - -newtype Env = Env - { statusEnv :: StatusEnv - } - -main :: IO () -main = - region $ \ioRegion -> do - lineRequest <- allocateGPIO ioRegion "test-status" - handle <- allocateReadline ioRegion - whileJust_ (readline handle) $ status lineRequest $ Env statusEnvDefault -- cgit v1.2.1