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

Copyright | Copyright (C) 2010 Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt (uwe\@fh-wedel.de)
Stability | experimental
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Control.Arrow.StateListArrow

Description

Implementation of list arrows with a state

Synopsis

- newtype SLA s a b = SLA {
  - runSLA :: s -> a -> (s, [b])
  }
- fromSLA :: ArrowList a => s -> SLA s b c -> a b c

# Documentation

newtype SLA s a b Source

list arrow combined with a state

Constructors

SLA |

Fields

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

Instances

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

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

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