Copyright | (c) 2024 Sayo Koyoneda |
---|---|
License | MPL-2.0 (see the LICENSE file) |
Maintainer | ymdfield@outlook.jp |
Safe Haskell | None |
Language | GHC2021 |
Control.Monad.Hefty.Output
Description
Interpreters for the Output
effect.
Synopsis
- runOutputEff :: forall o (ef :: [EffectF]) (eh :: [EffectH]). (o -> Eff eh ef ()) -> Eff eh (Output o ': ef) ~> Eff eh ef
- ignoreOutput :: forall o (ef :: [Type -> Type]) (eh :: [EffectH]) x. Eff eh (Output o ': ef) x -> Eff eh ef x
- runOutputList :: forall o a (ef :: [Type -> Type]). Eff ('[] :: [EffectH]) (Output o ': ef) a -> Eff ('[] :: [EffectH]) ef ([o], a)
- runOutputMonoid :: forall o w a (ef :: [Type -> Type]). Monoid w => (o -> w) -> Eff ('[] :: [EffectH]) (Output o ': ef) a -> Eff ('[] :: [EffectH]) ef (w, a)
- module Data.Effect.Output
Documentation
runOutputEff :: forall o (ef :: [EffectF]) (eh :: [EffectH]). (o -> Eff eh ef ()) -> Eff eh (Output o ': ef) ~> Eff eh ef Source #
Interprets the Output
effect using the given output handler.
ignoreOutput :: forall o (ef :: [Type -> Type]) (eh :: [EffectH]) x. Eff eh (Output o ': ef) x -> Eff eh ef x Source #
Interprets the Output
effect by ignoring the outputs.
runOutputList :: forall o a (ef :: [Type -> Type]). Eff ('[] :: [EffectH]) (Output o ': ef) a -> Eff ('[] :: [EffectH]) ef ([o], a) Source #
Interprets the Output
effect by accumulating the outputs into a list.
runOutputMonoid :: forall o w a (ef :: [Type -> Type]). Monoid w => (o -> w) -> Eff ('[] :: [EffectH]) (Output o ': ef) a -> Eff ('[] :: [EffectH]) ef (w, a) Source #
Interprets the Output
effect by accumulating the outputs into a monoid.
module Data.Effect.Output