disco-0.2: Functional programming language for teaching discrete math.
Copyrightdisco team and contributors
LicenseBSD-3-Clause
Maintainer[email protected]
Safe HaskellSafe-Inferred
LanguageHaskell2010

Disco.Effects.Input

Description

Utility functions for input effect.

Synopsis

Documentation

inputToState :: forall s r a. Member (State s) r => Sem (Input s ': r) a -> Sem r a Source #

Run an input effect in terms of an ambient state effect.

mapInput :: forall s t r a. Member (Input s) r => (s -> t) -> Sem (Input t ': r) a -> Sem r a Source #

Use a function to (contravariantly) transform the input value in an input effect.