heftia-effects-0.5.0.0: higher-order algebraic effects done right
Copyright(c) 2024 Sayo Koyoneda
LicenseMPL-2.0 (see the LICENSE file)
Maintainer[email protected]
Safe HaskellNone
LanguageGHC2021

Control.Monad.Hefty.Coroutine

Description

Interpreters for the coroutine effect.

Synopsis

Documentation

runCoroutine :: forall a b ans (ef :: [Type -> Type]). Eff ('[] :: [EffectH]) (Yield a b ': ef) ans -> Eff ('[] :: [EffectH]) ef (Status (Eff ('[] :: [EffectH]) ef) a b ans) Source #

Interpret the coroutine's Yield effect.

inputToYield :: Input i x -> Yield () i x Source #

Converts the Input effect into the coroutine's Yield effect.

outputToYield :: Output o x -> Yield o () x Source #

Converts the Output effect into the coroutine's Yield effect.