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

Portabilityportable
Stabilitystable
MaintainerUwe Schmidt (uwe@fh-wedel.de)

Text.XML.HXT.Arrow.XmlState.RunIOStateArrow

Description

run an io state arrow

Synopsis

Documentation

runX :: IOSArrow XmlTree c -> IO [c]Source

apply an IOSArrow to an empty root node with initialState () as initial state

the main entry point for running a state arrow with IO

when running runX f an empty XML root node is applied to f. usually f will start with a constant arrow (ignoring the input), e.g. a Text.XML.HXT.Arrow.ReadDocument.readDocument arrow.

for usage see examples with Text.XML.HXT.Arrow.WriteDocument.writeDocument

if input has to be feed into the arrow use runIOSLA like in runIOSLA f emptyX inputDoc

initialState :: us -> XIOState usSource

the default global state, used as initial state when running an IOSArrow with runIOSLA or runX