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

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

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 Source

list arrow combined with a state and the IO monad

Constructors

IOSLA |

Fields

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

Instances

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

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

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 Source

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.