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

Control.Monad.Hefty.Input

Description

Interpreters for the Input effect.

Synopsis

Documentation

runInputList :: forall i a es. 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.