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

Portability | portable
Stability | experimental
Maintainer | Uwe Schmidt (uwe\@fh-wedel.de)
Safe Haskell | Safe-Infered

Control.Arrow.IOStateListArrow

Description

Implementation of arrows with IO and a state

Synopsis

- newtype IOSLA s a b = IOSLA {
  - runIOSLA :: s -> a -> IO (s, [b])
  }
- liftSt :: IOSLA s1 b c -> IOSLA (s1, s2) b c
- runSt :: s2 -> IOSLA (s1, s2) b c -> IOSLA s1 b c

# Documentation

newtype IOSLA s a b

list arrow combined with a state and the IO monad

Constructors

IOSLA |

Fields

runIOSLA :: s -> a -> IO (s, [b])

Instances

ArrowState s (IOSLA s) |
Arrow (IOSLA s) |
ArrowZero (IOSLA s) |
ArrowPlus (IOSLA s) |
ArrowChoice (IOSLA s) |
ArrowApply (IOSLA s) |
Category (IOSLA s) |
ArrowList (IOSLA s) |
ArrowWNF (IOSLA s) |
ArrowNF (IOSLA s) |
ArrowIf (IOSLA s) |
ArrowNavigatableTree (IOSLA s) |
ArrowTree (IOSLA s) |
ArrowIOIf (IOSLA s) |
ArrowIO (IOSLA s) |
ArrowExc (IOSLA s) |
ArrowDTD (IOSLA s) |
ArrowXml (IOSLA s) |

liftSt :: IOSLA s1 b c -> IOSLA (s1, s2) b c

lift the state of an IOSLA arrow to a state with an additional component.

This is uesful, when running predefined IO arrows, e.g. for document input, in a context with a more complex state component.

runSt :: s2 -> IOSLA (s1, s2) b c -> IOSLA s1 b c

run an arrow with augmented state in the context of a simple state arrow. An initial value for the new state component is needed.

This is useful, when running an arrow with an extra environment component, e.g. for namespace handling in XML.