heftia-effects-0.7.0.0: higher-order algebraic effects done right
Copyright(c) 2024 Sayo contributors
LicenseMPL-2.0 (see the LICENSE file)
Maintainerymdfield@outlook.jp
Safe HaskellNone
LanguageGHC2021

Control.Monad.Hefty.Input

Description

Interpreters for the Input effect.

Synopsis

Documentation

runInputList :: forall i a (es :: [Effect]). FOEs es => [i] -> Eff (Input (Maybe i) ': es) a -> Eff es a Source #

Interprets the Input effect by using the given list as a series of inputs.

Each time input is called, it retrieves elements from the list one by one from the beginning, and after all elements are consumed, Nothing is returned indefinitely.