From 307cb1b1094c73fd15eab378c27ac0073696b739 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Tue, 19 Aug 2025 03:56:40 +0000 Subject: Improves formatting --- hsm-gpio/Hsm/GPIO.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'hsm-gpio/Hsm/GPIO.hs') diff --git a/hsm-gpio/Hsm/GPIO.hs b/hsm-gpio/Hsm/GPIO.hs index 2bcf3ed..7cc2c36 100644 --- a/hsm-gpio/Hsm/GPIO.hs +++ b/hsm-gpio/Hsm/GPIO.hs @@ -73,8 +73,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 + forM_ pins $ \pin -> unsafeEff_ $ lineRequestSetValue lineRequest (pinLine pin) lineValue setAllPins :: (GPIO :> es, Log "gpio" :> es) => LineValue -> Eff es () setAllPins lineValue = do @@ -122,8 +121,7 @@ runGPIO consumer action = do lineSettingsDealloc lineSettings = do logMsg Info "Freeing line settings" liftIO $ lineSettingsFree lineSettings - lineConfigBracket lineSettings = - allocateEff lineConfigAlloc lineConfigDealloc + lineConfigBracket lineSettings = allocateEff lineConfigAlloc lineConfigDealloc where lineConfigAlloc = do logMsg Info "Allocating line config" @@ -150,8 +148,7 @@ runGPIO consumer action = do requestConfigDealloc requestConfig = do logMsg Info "Freeing request config" liftIO $ requestConfigFree requestConfig - lineRequestBracket chip requestConfig lineConfig = - allocateEff lineRequestAlloc lineRequestDealloc + lineRequestBracket chip requestConfig lineConfig = allocateEff lineRequestAlloc lineRequestDealloc where lineRequestAlloc = do logMsg Info "Allocating line request" -- cgit v1.2.1