automaton-1.5: Effectful streams and automata in coalgebraic encoding
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Automaton.Trans.Reader

Description

An Automaton with a ReaderT layer has an extra input.

This module converts between explicit automata inputs and implicit ReaderT inputs.

Synopsis

Documentation

readerS :: Monad m => Automaton m (r, a) b -> Automaton (ReaderT r m) a b Source #

Convert an explicit Automaton input into an environment in the ReaderT monad transformer.

This is the opposite of runReaderS.

runReaderS :: Monad m => Automaton (ReaderT r m) a b -> Automaton m (r, a) b Source #

Convert an implicit ReaderT environment into an explicit Automaton input.

This is the opposite of readerS.

runReaderS_ :: Monad m => Automaton (ReaderT s m) a b -> s -> Automaton m a b Source #

Eliminate a ReaderT layer by providing its environment statically.