machines-0.6.4: Networked stream transducers

Copyright(C) 2012 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
PortabilityGADTs
Safe HaskellNone
LanguageHaskell2010

Data.Machine.Stack

Description

 
Synopsis

Documentation

data Stack a r where Source #

This is a simple process type that knows how to push back input.

Constructors

Push :: a -> Stack a () 
Pop :: Stack a a 

stack :: Monad m => MachineT m k a -> MachineT m (Stack a) o -> MachineT m k o Source #

Stream outputs from one Machine into another with the possibility of pushing inputs back.

peek :: Plan (Stack a) b a Source #

Peek at the next value in the input stream without consuming it

pop :: Plan (Stack a) b a Source #

Pop the next value in the input stream

push :: a -> Plan (Stack a) b () Source #

Push back into the input stream