diff options
author | Paul Oliver <contact@pauloliver.dev> | 2025-07-02 15:06:35 +0200 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2025-08-13 23:54:10 +0000 |
commit | 8fe62292f18f4577303a868a8557b0486b218bcb (patch) | |
tree | cb9a9108eea479e932f37d03cf399b680e3886b2 /hsm-bin/Test/Status.hs | |
parent | 0be7f1274e0cb8406bd4262b86d5e2e9dda77d7a (diff) |
Code now uses `effectful` to manage side-effects
Diffstat (limited to 'hsm-bin/Test/Status.hs')
-rw-r--r-- | hsm-bin/Test/Status.hs | 18 |
1 files changed, 0 insertions, 18 deletions
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 |