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-pwm/Hsm/PWM.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'hsm-pwm/Hsm') diff --git a/hsm-pwm/Hsm/PWM.hs b/hsm-pwm/Hsm/PWM.hs index aa16d5c..400e704 100644 --- a/hsm-pwm/Hsm/PWM.hs +++ b/hsm-pwm/Hsm/PWM.hs @@ -101,9 +101,7 @@ setCycleDuration channel cycleDuration = do setEnable channel True runPWM - :: (IOE :> es, Log "pwm" :> es, Resource :> es) - => Eff (PWM : es) a - -> Eff es a + :: (IOE :> es, Log "pwm" :> es, Resource :> es) => Eff (PWM : es) a -> Eff es a runPWM action = evalStaticRep (PWM ()) $ do void $ allocateEff_ pwmAlloc pwmDealloc @@ -126,8 +124,7 @@ runPWM action = waitWritable exportPath waitWritable unexportPath forM_ allChannels $ \channel -> do - logMsg Info $ - "Exporting channel " <> show channel <> " on chip " <> chipPath + logMsg Info $ "Exporting channel " <> show channel <> " on chip " <> chipPath liftIO . writeFile exportPath $ show (channelIndex channel) waitWritable $ enablePath channel waitWritable $ periodPath channel @@ -136,6 +133,5 @@ runPWM action = pwmDealloc = forM_ allChannels $ \channel -> do setEnable channel False - logMsg Info $ - "Unexporting channel " <> show channel <> " on chip " <> chipPath + logMsg Info $ "Unexporting channel " <> show channel <> " on chip " <> chipPath liftIO . writeFile unexportPath $ show (channelIndex channel) -- cgit v1.2.1