diff options
Diffstat (limited to 'hsm-core/Hsm/Core')
-rw-r--r-- | hsm-core/Hsm/Core/Fsm.hs | 5 | ||||
-rw-r--r-- | hsm-core/Hsm/Core/Log.hs | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/hsm-core/Hsm/Core/Fsm.hs b/hsm-core/Hsm/Core/Fsm.hs index d1c2f5d..b04cca3 100644 --- a/hsm-core/Hsm/Core/Fsm.hs +++ b/hsm-core/Hsm/Core/Fsm.hs @@ -26,8 +26,9 @@ data FsmOutput i o env sta = data FsmResult i o env sta = FsmResult o sta (FsmState i o env sta) --- Finite state machines allow processing of stream elements using pure --- functions. One or more FSMs can be included within a `Streamly` pipeline. +-- Finite State Machine (FSM): Implements a finite state machine for +-- processing individual stream elements using pure functions. Multiple FSMs +-- can be included as elements in a `Streamly` pipeline. fsm :: forall i o env sta es. ( Log :> es diff --git a/hsm-core/Hsm/Core/Log.hs b/hsm-core/Hsm/Core/Log.hs index 6930e90..c097e0f 100644 --- a/hsm-core/Hsm/Core/Log.hs +++ b/hsm-core/Hsm/Core/Log.hs @@ -11,8 +11,9 @@ import Effectful (Eff, (:>)) import Effectful.Dispatch.Static (unsafeEff_) import Effectful.Log qualified as L --- Helper function allows logging within IO, Useful during `resourcet` --- allocation and release operations. +-- This helper function enables logging within the IO monad, which is +-- particularly useful during resource allocation and release operations with +-- `resourcet`. withLogIO :: L.Log :> es => Eff es (L.LogLevel -> Text -> IO ()) withLogIO = do logIO <- L.getLoggerIO |