diff options
author | Paul Oliver <contact@pauloliver.dev> | 2025-08-19 03:56:40 +0000 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2025-08-23 22:59:12 +0000 |
commit | 307cb1b1094c73fd15eab378c27ac0073696b739 (patch) | |
tree | 730949857bd356a7d1f1739b1c8c28967d0461e4 /hsm-pwm/Hsm/PWM.hs | |
parent | 4efe903a671b288ac485f2d2a9c9aabf2eb7b199 (diff) |
Improves formatting
Diffstat (limited to 'hsm-pwm/Hsm/PWM.hs')
-rw-r--r-- | hsm-pwm/Hsm/PWM.hs | 10 |
1 files changed, 3 insertions, 7 deletions
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) |