hxt-9.3.1.9: A collection of tools for processing XML with Haskell.

Portabilityportable
Stabilityexperimental
MaintainerUwe Schmidt (uwe\@fh-wedel.de)
Safe HaskellSafe-Inferred

Control.Arrow.StateListArrow

Description

Implementation of list arrows with a state

Synopsis

Documentation

newtype SLA s a b Source

list arrow combined with a state

Constructors

SLA 

Fields

runSLA :: s -> a -> (s, [b])
 

Instances

ArrowState s (SLA s) 
Category (SLA s) 
ArrowZero (SLA s) 
ArrowPlus (SLA s) 
ArrowChoice (SLA s) 
ArrowApply (SLA s) 
Arrow (SLA s) 
ArrowList (SLA s) 
ArrowWNF (SLA s) 
ArrowNF (SLA s) 
ArrowIf (SLA s) 
ArrowNavigatableTree (SLA s) 
ArrowTree (SLA s) 
ArrowDTD (SLA s) 
ArrowXml (SLA s) 

fromSLA :: ArrowList a => s -> SLA s b c -> a b cSource

conversion of state list arrows into arbitray other list arrows.

allows running a state list arrow within another arrow:

example:

 ... >>> fromSLA 0 (... setState ... getState ... ) >>> ...

runs a state arrow with initial state 0 (e..g. an Int) within another arrow sequence