aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2025-08-31 19:19:35 +0000
committerPaul Oliver <contact@pauloliver.dev>2025-08-31 21:46:58 +0000
commit765794c37ca7130e23dc460d7e507d43c8df2470 (patch)
treee5d685f9ac9373d1fa22734837ef6d73d54c608e
parenta0c172c871f404f268850fd22ef90268576b0cc6 (diff)
Extracts `unsafeEff_` from inside `forM_` loop in `GPIO.hs`
-rw-r--r--hsm-gpio/Hsm/GPIO.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/hsm-gpio/Hsm/GPIO.hs b/hsm-gpio/Hsm/GPIO.hs
index 8f3115d..fcb3a00 100644
--- a/hsm-gpio/Hsm/GPIO.hs
+++ b/hsm-gpio/Hsm/GPIO.hs
@@ -68,7 +68,7 @@ setPins :: (GPIO :> es, Log "gpio" :> es) => [GPIOPin] -> LineValue -> Eff es ()
setPins pins lineValue = do
GPIO lineRequest <- getStaticRep
logMsg Trace $ "Setting pin(s) " <> show pins <> " to " <> show lineValue
- forM_ pins $ \pin -> unsafeEff_ $ lineRequestSetValue lineRequest (pinLine pin) lineValue
+ unsafeEff_ . forM_ pins $ \pin -> lineRequestSetValue lineRequest (pinLine pin) lineValue
setAllPins :: (GPIO :> es, Log "gpio" :> es) => LineValue -> Eff es ()
setAllPins lineValue = do