data-effects-0.3.0.1: A basic framework for effect systems based on effects represented by GADTs.
Copyright(c) 2023 Sayo Koyoneda
LicenseMPL-2.0 (see the file LICENSE)
Maintainer[email protected]
Safe HaskellNone
LanguageGHC2021

Data.Effect.Input

Description

This module provides the Input effect, comes from Polysemy.Input in the polysemy package.

Realizes input of values from the external world.

Synopsis

Documentation

data Input i a where Source #

A general effect representing input of values from the external world.

Constructors

Input :: forall i. Input i i

Retrieve a value input from the external world.

type LInput i = LiftFOE (Input i) Source #

pattern LInput :: forall a i f. () => (a ~ i, ()) => LiftFOE (Input i) f a Source #

input :: SendFOE (Input i) f => f i Source #

Retrieve a value input from the external world.

input' :: forall {k} (tag :: k) i f. SendFOE (Tag (Input i) tag) f => f i Source #

Retrieve a value input from the external world.

input'' :: forall {k} (key :: k) i f. SendFOEBy key (Input i) f => f i Source #

Retrieve a value input from the external world.

inputs :: (Input i <: f, Functor f) => (i -> a) -> f a Source #

Returns the value obtained by transforming the input value using the given function.