hxt-9.3.1.22: 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-Inferred
Language | Haskell2010

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

Instances details

Category (IOSLA s :: Type -> Type -> Type) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods id :: IOSLA s a a # (.) :: IOSLA s b c -> IOSLA s a b -> IOSLA s a c #
ArrowState s (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods changeState :: (s -> b -> s) -> IOSLA s b b # accessState :: (s -> b -> c) -> IOSLA s b c # getState :: IOSLA s b s # setState :: IOSLA s s s # nextState :: (s -> s) -> IOSLA s b s #
Arrow (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods arr :: (b -> c) -> IOSLA s b c # first :: IOSLA s b c -> IOSLA s (b, d) (c, d) # second :: IOSLA s b c -> IOSLA s (d, b) (d, c) # (***) :: IOSLA s b c -> IOSLA s b' c' -> IOSLA s (b, b') (c, c') # (&&&) :: IOSLA s b c -> IOSLA s b c' -> IOSLA s b (c, c') #
ArrowApply (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods app :: IOSLA s (IOSLA s b c, b) c #
ArrowChoice (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods left :: IOSLA s b c -> IOSLA s (Either b d) (Either c d) # right :: IOSLA s b c -> IOSLA s (Either d b) (Either d c) # (+++) :: IOSLA s b c -> IOSLA s b' c' -> IOSLA s (Either b b') (Either c c') # (|||) :: IOSLA s b d -> IOSLA s c d -> IOSLA s (Either b c) d #
ArrowPlus (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods (<+>) :: IOSLA s b c -> IOSLA s b c -> IOSLA s b c #
ArrowZero (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods zeroArrow :: IOSLA s b c #
ArrowExc (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods tryA :: IOSLA s b c -> IOSLA s b (Either SomeException c) # catchA :: IOSLA s b c -> IOSLA s SomeException c -> IOSLA s b c #
ArrowIO (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods arrIO :: (b -> IO c) -> IOSLA s b c # arrIO0 :: IO c -> IOSLA s b c # arrIO2 :: (b1 -> b2 -> IO c) -> IOSLA s (b1, b2) c # arrIO3 :: (b1 -> b2 -> b3 -> IO c) -> IOSLA s (b1, (b2, b3)) c # arrIO4 :: (b1 -> b2 -> b3 -> b4 -> IO c) -> IOSLA s (b1, (b2, (b3, b4))) c #
ArrowIOIf (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods isIOA :: (b -> IO Bool) -> IOSLA s b b #
ArrowIf (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods ifA :: IOSLA s b c -> IOSLA s b d -> IOSLA s b d -> IOSLA s b d # ifP :: (b -> Bool) -> IOSLA s b d -> IOSLA s b d -> IOSLA s b d # neg :: IOSLA s b c -> IOSLA s b b # when :: IOSLA s b b -> IOSLA s b c -> IOSLA s b b # whenP :: IOSLA s b b -> (b -> Bool) -> IOSLA s b b # whenNot :: IOSLA s b b -> IOSLA s b c -> IOSLA s b b # whenNotP :: IOSLA s b b -> (b -> Bool) -> IOSLA s b b # guards :: IOSLA s b c -> IOSLA s b d -> IOSLA s b d # guardsP :: (b -> Bool) -> IOSLA s b d -> IOSLA s b d # filterA :: IOSLA s b c -> IOSLA s b b # containing :: IOSLA s b c -> IOSLA s c d -> IOSLA s b c # notContaining :: IOSLA s b c -> IOSLA s c d -> IOSLA s b c # orElse :: IOSLA s b c -> IOSLA s b c -> IOSLA s b c # choiceA :: [IfThen (IOSLA s b c) (IOSLA s b d)] -> IOSLA s b d # tagA :: IOSLA s b c -> IOSLA s b (Either b b) # spanA :: IOSLA s b b -> IOSLA s [b] ([b], [b]) # partitionA :: IOSLA s b b -> IOSLA s [b] ([b], [b]) #
ArrowList (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods arr2 :: (b1 -> b2 -> c) -> IOSLA s (b1, b2) c # arr3 :: (b1 -> b2 -> b3 -> c) -> IOSLA s (b1, (b2, b3)) c # arr4 :: (b1 -> b2 -> b3 -> b4 -> c) -> IOSLA s (b1, (b2, (b3, b4))) c # arr2A :: (b -> IOSLA s c d) -> IOSLA s (b, c) d # arrL :: (b -> [c]) -> IOSLA s b c # arr2L :: (b -> c -> [d]) -> IOSLA s (b, c) d # constA :: c -> IOSLA s b c # constL :: [c] -> IOSLA s b c # isA :: (b -> Bool) -> IOSLA s b b # (>>.) :: IOSLA s b c -> ([c] -> [d]) -> IOSLA s b d # (>.) :: IOSLA s b c -> ([c] -> d) -> IOSLA s b d # listA :: IOSLA s b c -> IOSLA s b [c] # unlistA :: IOSLA s [b] b # this :: IOSLA s b b # none :: IOSLA s b c # withDefault :: IOSLA s b c -> c -> IOSLA s b c # single :: IOSLA s b c -> IOSLA s b c # applyA :: IOSLA s b (IOSLA s b c) -> IOSLA s b c # ($<) :: (c -> IOSLA s b d) -> IOSLA s b c -> IOSLA s b d # ($<<) :: (c1 -> c2 -> IOSLA s b d) -> IOSLA s b (c1, c2) -> IOSLA s b d # ($<<<) :: (c1 -> c2 -> c3 -> IOSLA s b d) -> IOSLA s b (c1, (c2, c3)) -> IOSLA s b d # ($<<<<) :: (c1 -> c2 -> c3 -> c4 -> IOSLA s b d) -> IOSLA s b (c1, (c2, (c3, c4))) -> IOSLA s b d # ($<$) :: (c -> IOSLA s b b) -> IOSLA s b c -> IOSLA s b b # mergeA :: (IOSLA s (a1, b1) a1 -> IOSLA s (a1, b1) b1 -> IOSLA s (a1, b1) c) -> IOSLA s (a1, b1) c # perform :: IOSLA s b c -> IOSLA s b b # catA :: [IOSLA s b c] -> IOSLA s b c # seqA :: [IOSLA s b b] -> IOSLA s b b #
ArrowNF (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods rnfA :: NFData c => IOSLA s b c -> IOSLA s b c #
ArrowWNF (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods rwnfA :: WNFData c => IOSLA s b c -> IOSLA s b c # rwnf2A :: WNFData c => IOSLA s b c -> IOSLA s b c #
ArrowNavigatableTree (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods moveUp :: NavigatableTree t => IOSLA s (t b) (t b) # moveDown :: NavigatableTree t => IOSLA s (t b) (t b) # moveLeft :: NavigatableTree t => IOSLA s (t b) (t b) # moveRight :: NavigatableTree t => IOSLA s (t b) (t b) #
ArrowTree (IOSLA s) # |
Instance details Defined in Control.Arrow.IOStateListArrow Methods mkLeaf :: Tree t => b -> IOSLA s c (t b) # mkTree :: Tree t => b -> [t b] -> IOSLA s c (t b) # getChildren :: Tree t => IOSLA s (t b) (t b) # getNode :: Tree t => IOSLA s (t b) b # hasNode :: Tree t => (b -> Bool) -> IOSLA s (t b) (t b) # setChildren :: Tree t => [t b] -> IOSLA s (t b) (t b) # setNode :: Tree t => b -> IOSLA s (t b) (t b) # changeChildren :: Tree t => ([t b] -> [t b]) -> IOSLA s (t b) (t b) # changeNode :: Tree t => (b -> b) -> IOSLA s (t b) (t b) # processChildren :: Tree t => IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # replaceChildren :: Tree t => IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # (/>) :: Tree t => IOSLA s b (t c) -> IOSLA s (t c) d -> IOSLA s b d # (//>) :: Tree t => IOSLA s b (t c) -> IOSLA s (t c) d -> IOSLA s b d # (</) :: Tree t => IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # deep :: Tree t => IOSLA s (t b) c -> IOSLA s (t b) c # deepest :: Tree t => IOSLA s (t b) c -> IOSLA s (t b) c # multi :: Tree t => IOSLA s (t b) c -> IOSLA s (t b) c # processBottomUp :: Tree t => IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # processTopDown :: Tree t => IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # processBottomUpWhenNot :: Tree t => IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # processTopDownUntil :: Tree t => IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # insertChildrenAt :: Tree t => Int -> IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # insertChildrenAfter :: Tree t => IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) -> IOSLA s (t b) (t b) # insertTreeTemplate :: Tree t => IOSLA s (t b) (t b) -> [IfThen (IOSLA s (t b) c) (IOSLA s (t b) (t b))] -> IOSLA s (t b) (t b) #
ArrowDTD (IOSLA s) # |
Instance details Defined in Text.XML.HXT.Arrow.XmlArrow Methods isDTDDoctype :: IOSLA s XmlTree XmlTree # isDTDElement :: IOSLA s XmlTree XmlTree # isDTDContent :: IOSLA s XmlTree XmlTree # isDTDAttlist :: IOSLA s XmlTree XmlTree # isDTDEntity :: IOSLA s XmlTree XmlTree # isDTDPEntity :: IOSLA s XmlTree XmlTree # isDTDNotation :: IOSLA s XmlTree XmlTree # isDTDCondSect :: IOSLA s XmlTree XmlTree # isDTDName :: IOSLA s XmlTree XmlTree # isDTDPERef :: IOSLA s XmlTree XmlTree # hasDTDAttr :: String -> IOSLA s XmlTree XmlTree # getDTDAttrValue :: String -> IOSLA s XmlTree String # setDTDAttrValue :: String -> String -> IOSLA s XmlTree XmlTree # mkDTDElem :: DTDElem -> Attributes -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkDTDDoctype :: Attributes -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkDTDElement :: Attributes -> IOSLA s n XmlTree # mkDTDEntity :: Attributes -> IOSLA s n XmlTree # mkDTDPEntity :: Attributes -> IOSLA s n XmlTree #
ArrowXml (IOSLA s) # |
Instance details Defined in Text.XML.HXT.Arrow.XmlArrow Methods isText :: IOSLA s XmlTree XmlTree # isBlob :: IOSLA s XmlTree XmlTree # isCharRef :: IOSLA s XmlTree XmlTree # isEntityRef :: IOSLA s XmlTree XmlTree # isCmt :: IOSLA s XmlTree XmlTree # isCdata :: IOSLA s XmlTree XmlTree # isPi :: IOSLA s XmlTree XmlTree # isXmlPi :: IOSLA s XmlTree XmlTree # isElem :: IOSLA s XmlTree XmlTree # isDTD :: IOSLA s XmlTree XmlTree # isAttr :: IOSLA s XmlTree XmlTree # isError :: IOSLA s XmlTree XmlTree # isRoot :: IOSLA s XmlTree XmlTree # hasText :: (String -> Bool) -> IOSLA s XmlTree XmlTree # isWhiteSpace :: IOSLA s XmlTree XmlTree # hasNameWith :: (QName -> Bool) -> IOSLA s XmlTree XmlTree # hasQName :: QName -> IOSLA s XmlTree XmlTree # hasName :: String -> IOSLA s XmlTree XmlTree # hasLocalPart :: String -> IOSLA s XmlTree XmlTree # hasNamePrefix :: String -> IOSLA s XmlTree XmlTree # hasNamespaceUri :: String -> IOSLA s XmlTree XmlTree # hasAttr :: String -> IOSLA s XmlTree XmlTree # hasQAttr :: QName -> IOSLA s XmlTree XmlTree # hasAttrValue :: String -> (String -> Bool) -> IOSLA s XmlTree XmlTree # hasQAttrValue :: QName -> (String -> Bool) -> IOSLA s XmlTree XmlTree # mkText :: IOSLA s String XmlTree # mkBlob :: IOSLA s Blob XmlTree # mkCharRef :: IOSLA s Int XmlTree # mkEntityRef :: IOSLA s String XmlTree # mkCmt :: IOSLA s String XmlTree # mkCdata :: IOSLA s String XmlTree # mkError :: Int -> IOSLA s String XmlTree # mkElement :: QName -> IOSLA s n XmlTree -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkAttr :: QName -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkPi :: QName -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkqelem :: QName -> [IOSLA s n XmlTree] -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # mkelem :: String -> [IOSLA s n XmlTree] -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # aelem :: String -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # selem :: String -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # eelem :: String -> IOSLA s n XmlTree # root :: [IOSLA s n XmlTree] -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # qattr :: QName -> IOSLA s n XmlTree -> IOSLA s n XmlTree # attr :: String -> IOSLA s n XmlTree -> IOSLA s n XmlTree # txt :: String -> IOSLA s n XmlTree # blb :: Blob -> IOSLA s n XmlTree # charRef :: Int -> IOSLA s n XmlTree # entityRef :: String -> IOSLA s n XmlTree # cmt :: String -> IOSLA s n XmlTree # warn :: String -> IOSLA s n XmlTree # err :: String -> IOSLA s n XmlTree # fatal :: String -> IOSLA s n XmlTree # spi :: String -> String -> IOSLA s n XmlTree # sqattr :: QName -> String -> IOSLA s n XmlTree # sattr :: String -> String -> IOSLA s n XmlTree # getText :: IOSLA s XmlTree String # getCharRef :: IOSLA s XmlTree Int # getEntityRef :: IOSLA s XmlTree String # getCmt :: IOSLA s XmlTree String # getCdata :: IOSLA s XmlTree String # getPiName :: IOSLA s XmlTree QName # getPiContent :: IOSLA s XmlTree XmlTree # getElemName :: IOSLA s XmlTree QName # getAttrl :: IOSLA s XmlTree XmlTree # getDTDPart :: IOSLA s XmlTree DTDElem # getDTDAttrl :: IOSLA s XmlTree Attributes # getAttrName :: IOSLA s XmlTree QName # getErrorLevel :: IOSLA s XmlTree Int # getErrorMsg :: IOSLA s XmlTree String # getQName :: IOSLA s XmlTree QName # getName :: IOSLA s XmlTree String # getUniversalName :: IOSLA s XmlTree String # getUniversalUri :: IOSLA s XmlTree String # getLocalPart :: IOSLA s XmlTree String # getNamePrefix :: IOSLA s XmlTree String # getNamespaceUri :: IOSLA s XmlTree String # getAttrValue :: String -> IOSLA s XmlTree String # getAttrValue0 :: String -> IOSLA s XmlTree String # getQAttrValue :: QName -> IOSLA s XmlTree String # getQAttrValue0 :: QName -> IOSLA s XmlTree String # changeText :: (String -> String) -> IOSLA s XmlTree XmlTree # changeBlob :: (Blob -> Blob) -> IOSLA s XmlTree XmlTree # changeCmt :: (String -> String) -> IOSLA s XmlTree XmlTree # changeQName :: (QName -> QName) -> IOSLA s XmlTree XmlTree # changeElemName :: (QName -> QName) -> IOSLA s XmlTree XmlTree # changeAttrName :: (QName -> QName) -> IOSLA s XmlTree XmlTree # changePiName :: (QName -> QName) -> IOSLA s XmlTree XmlTree # changeAttrValue :: (String -> String) -> IOSLA s XmlTree XmlTree # changeAttrl :: (XmlTrees -> XmlTrees -> XmlTrees) -> IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # setQName :: QName -> IOSLA s XmlTree XmlTree # setElemName :: QName -> IOSLA s XmlTree XmlTree # setAttrName :: QName -> IOSLA s XmlTree XmlTree # setPiName :: QName -> IOSLA s XmlTree XmlTree # setAttrl :: IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # addAttrl :: IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # addAttr :: String -> String -> IOSLA s XmlTree XmlTree # removeAttr :: String -> IOSLA s XmlTree XmlTree # removeQAttr :: QName -> IOSLA s XmlTree XmlTree # processAttrl :: IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # processTopDownWithAttrl :: IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # (+=) :: IOSLA s b XmlTree -> IOSLA s b XmlTree -> IOSLA s b XmlTree # xshow :: IOSLA s n XmlTree -> IOSLA s n String # xshowBlob :: IOSLA s n XmlTree -> IOSLA s n Blob #

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.