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

CopyrightCopyright (C) 2010 Uwe Schmidt
LicenseMIT
MaintainerUwe Schmidt (uwe\@fh-wedel.de)
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Control.Arrow.StateListArrow

Description

Implementation of list arrows with a state

Synopsis

Documentation

newtype SLA s a b #

list arrow combined with a state

Constructors

SLA 

Fields

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

Instances

ArrowState s (SLA s) # 

Methods

changeState :: (s -> b -> s) -> SLA s b b #

accessState :: (s -> b -> c) -> SLA s b c #

getState :: SLA s b s #

setState :: SLA s s s #

nextState :: (s -> s) -> SLA s b s #

Arrow (SLA s) # 

Methods

arr :: (b -> c) -> SLA s b c #

first :: SLA s b c -> SLA s (b, d) (c, d) #

second :: SLA s b c -> SLA s (d, b) (d, c) #

(***) :: SLA s b c -> SLA s b' c' -> SLA s (b, b') (c, c') #

(&&&) :: SLA s b c -> SLA s b c' -> SLA s b (c, c') #

ArrowZero (SLA s) # 

Methods

zeroArrow :: SLA s b c #

ArrowPlus (SLA s) # 

Methods

(<+>) :: SLA s b c -> SLA s b c -> SLA s b c #

ArrowChoice (SLA s) # 

Methods

left :: SLA s b c -> SLA s (Either b d) (Either c d) #

right :: SLA s b c -> SLA s (Either d b) (Either d c) #

(+++) :: SLA s b c -> SLA s b' c' -> SLA s (Either b b') (Either c c') #

(|||) :: SLA s b d -> SLA s c d -> SLA s (Either b c) d #

ArrowApply (SLA s) # 

Methods

app :: SLA s (SLA s b c, b) c #

ArrowList (SLA s) # 

Methods

arr2 :: (b1 -> b2 -> c) -> SLA s (b1, b2) c #

arr3 :: (b1 -> b2 -> b3 -> c) -> SLA s (b1, (b2, b3)) c #

arr4 :: (b1 -> b2 -> b3 -> b4 -> c) -> SLA s (b1, (b2, (b3, b4))) c #

arr2A :: (b -> SLA s c d) -> SLA s (b, c) d #

arrL :: (b -> [c]) -> SLA s b c #

arr2L :: (b -> c -> [d]) -> SLA s (b, c) d #

constA :: c -> SLA s b c #

constL :: [c] -> SLA s b c #

isA :: (b -> Bool) -> SLA s b b #

(>>.) :: SLA s b c -> ([c] -> [d]) -> SLA s b d #

(>.) :: SLA s b c -> ([c] -> d) -> SLA s b d #

listA :: SLA s b c -> SLA s b [c] #

unlistA :: SLA s [b] b #

this :: SLA s b b #

none :: SLA s b c #

withDefault :: SLA s b c -> c -> SLA s b c #

single :: SLA s b c -> SLA s b c #

applyA :: SLA s b (SLA s b c) -> SLA s b c #

($<) :: (c -> SLA s b d) -> SLA s b c -> SLA s b d #

($<<) :: (c1 -> c2 -> SLA s b d) -> SLA s b (c1, c2) -> SLA s b d #

($<<<) :: (c1 -> c2 -> c3 -> SLA s b d) -> SLA s b (c1, (c2, c3)) -> SLA s b d #

($<<<<) :: (c1 -> c2 -> c3 -> c4 -> SLA s b d) -> SLA s b (c1, (c2, (c3, c4))) -> SLA s b d #

($<$) :: (c -> SLA s b b) -> SLA s b c -> SLA s b b #

mergeA :: (SLA s (a1, b1) a1 -> SLA s (a1, b1) b1 -> SLA s (a1, b1) c) -> SLA s (a1, b1) c #

perform :: SLA s b c -> SLA s b b #

catA :: [SLA s b c] -> SLA s b c #

seqA :: [SLA s b b] -> SLA s b b #

ArrowWNF (SLA s) # 

Methods

rwnfA :: WNFData c => SLA s b c -> SLA s b c #

rwnf2A :: WNFData c => SLA s b c -> SLA s b c #

ArrowNF (SLA s) # 

Methods

rnfA :: NFData c => SLA s b c -> SLA s b c #

ArrowIf (SLA s) # 

Methods

ifA :: SLA s b c -> SLA s b d -> SLA s b d -> SLA s b d #

ifP :: (b -> Bool) -> SLA s b d -> SLA s b d -> SLA s b d #

neg :: SLA s b c -> SLA s b b #

when :: SLA s b b -> SLA s b c -> SLA s b b #

whenP :: SLA s b b -> (b -> Bool) -> SLA s b b #

whenNot :: SLA s b b -> SLA s b c -> SLA s b b #

whenNotP :: SLA s b b -> (b -> Bool) -> SLA s b b #

guards :: SLA s b c -> SLA s b d -> SLA s b d #

guardsP :: (b -> Bool) -> SLA s b d -> SLA s b d #

filterA :: SLA s b c -> SLA s b b #

containing :: SLA s b c -> SLA s c d -> SLA s b c #

notContaining :: SLA s b c -> SLA s c d -> SLA s b c #

orElse :: SLA s b c -> SLA s b c -> SLA s b c #

choiceA :: [IfThen (SLA s b c) (SLA s b d)] -> SLA s b d #

tagA :: SLA s b c -> SLA s b (Either b b) #

spanA :: SLA s b b -> SLA s [b] ([b], [b]) #

partitionA :: SLA s b b -> SLA s [b] ([b], [b]) #

ArrowNavigatableTree (SLA s) # 

Methods

moveUp :: NavigatableTree t => SLA s (t b) (t b) #

moveDown :: NavigatableTree t => SLA s (t b) (t b) #

moveLeft :: NavigatableTree t => SLA s (t b) (t b) #

moveRight :: NavigatableTree t => SLA s (t b) (t b) #

ArrowTree (SLA s) # 

Methods

mkLeaf :: Tree t => b -> SLA s c (t b) #

mkTree :: Tree t => b -> [t b] -> SLA s c (t b) #

getChildren :: Tree t => SLA s (t b) (t b) #

getNode :: Tree t => SLA s (t b) b #

hasNode :: Tree t => (b -> Bool) -> SLA s (t b) (t b) #

setChildren :: Tree t => [t b] -> SLA s (t b) (t b) #

setNode :: Tree t => b -> SLA s (t b) (t b) #

changeChildren :: Tree t => ([t b] -> [t b]) -> SLA s (t b) (t b) #

changeNode :: Tree t => (b -> b) -> SLA s (t b) (t b) #

processChildren :: Tree t => SLA s (t b) (t b) -> SLA s (t b) (t b) #

replaceChildren :: Tree t => SLA s (t b) (t b) -> SLA s (t b) (t b) #

(/>) :: Tree t => SLA s b (t c) -> SLA s (t c) d -> SLA s b d #

(//>) :: Tree t => SLA s b (t c) -> SLA s (t c) d -> SLA s b d #

(</) :: Tree t => SLA s (t b) (t b) -> SLA s (t b) (t b) -> SLA s (t b) (t b) #

deep :: Tree t => SLA s (t b) c -> SLA s (t b) c #

deepest :: Tree t => SLA s (t b) c -> SLA s (t b) c #

multi :: Tree t => SLA s (t b) c -> SLA s (t b) c #

processBottomUp :: Tree t => SLA s (t b) (t b) -> SLA s (t b) (t b) #

processTopDown :: Tree t => SLA s (t b) (t b) -> SLA s (t b) (t b) #

processBottomUpWhenNot :: Tree t => SLA s (t b) (t b) -> SLA s (t b) (t b) -> SLA s (t b) (t b) #

processTopDownUntil :: Tree t => SLA s (t b) (t b) -> SLA s (t b) (t b) #

insertChildrenAt :: Tree t => Int -> SLA s (t b) (t b) -> SLA s (t b) (t b) #

insertChildrenAfter :: Tree t => SLA s (t b) (t b) -> SLA s (t b) (t b) -> SLA s (t b) (t b) #

insertTreeTemplate :: Tree t => SLA s (t b) (t b) -> [IfThen (SLA s (t b) c) (SLA s (t b) (t b))] -> SLA s (t b) (t b) #

ArrowDTD (SLA s) # 
ArrowXml (SLA s) # 

Methods

isText :: SLA s XmlTree XmlTree #

isBlob :: SLA s XmlTree XmlTree #

isCharRef :: SLA s XmlTree XmlTree #

isEntityRef :: SLA s XmlTree XmlTree #

isCmt :: SLA s XmlTree XmlTree #

isCdata :: SLA s XmlTree XmlTree #

isPi :: SLA s XmlTree XmlTree #

isXmlPi :: SLA s XmlTree XmlTree #

isElem :: SLA s XmlTree XmlTree #

isDTD :: SLA s XmlTree XmlTree #

isAttr :: SLA s XmlTree XmlTree #

isError :: SLA s XmlTree XmlTree #

isRoot :: SLA s XmlTree XmlTree #

hasText :: (String -> Bool) -> SLA s XmlTree XmlTree #

isWhiteSpace :: SLA s XmlTree XmlTree #

hasNameWith :: (QName -> Bool) -> SLA s XmlTree XmlTree #

hasQName :: QName -> SLA s XmlTree XmlTree #

hasName :: String -> SLA s XmlTree XmlTree #

hasLocalPart :: String -> SLA s XmlTree XmlTree #

hasNamePrefix :: String -> SLA s XmlTree XmlTree #

hasNamespaceUri :: String -> SLA s XmlTree XmlTree #

hasAttr :: String -> SLA s XmlTree XmlTree #

hasQAttr :: QName -> SLA s XmlTree XmlTree #

hasAttrValue :: String -> (String -> Bool) -> SLA s XmlTree XmlTree #

hasQAttrValue :: QName -> (String -> Bool) -> SLA s XmlTree XmlTree #

mkText :: SLA s String XmlTree #

mkBlob :: SLA s Blob XmlTree #

mkCharRef :: SLA s Int XmlTree #

mkEntityRef :: SLA s String XmlTree #

mkCmt :: SLA s String XmlTree #

mkCdata :: SLA s String XmlTree #

mkError :: Int -> SLA s String XmlTree #

mkElement :: QName -> SLA s n XmlTree -> SLA s n XmlTree -> SLA s n XmlTree #

mkAttr :: QName -> SLA s n XmlTree -> SLA s n XmlTree #

mkPi :: QName -> SLA s n XmlTree -> SLA s n XmlTree #

mkqelem :: QName -> [SLA s n XmlTree] -> [SLA s n XmlTree] -> SLA s n XmlTree #

mkelem :: String -> [SLA s n XmlTree] -> [SLA s n XmlTree] -> SLA s n XmlTree #

aelem :: String -> [SLA s n XmlTree] -> SLA s n XmlTree #

selem :: String -> [SLA s n XmlTree] -> SLA s n XmlTree #

eelem :: String -> SLA s n XmlTree #

root :: [SLA s n XmlTree] -> [SLA s n XmlTree] -> SLA s n XmlTree #

qattr :: QName -> SLA s n XmlTree -> SLA s n XmlTree #

attr :: String -> SLA s n XmlTree -> SLA s n XmlTree #

txt :: String -> SLA s n XmlTree #

blb :: Blob -> SLA s n XmlTree #

charRef :: Int -> SLA s n XmlTree #

entityRef :: String -> SLA s n XmlTree #

cmt :: String -> SLA s n XmlTree #

warn :: String -> SLA s n XmlTree #

err :: String -> SLA s n XmlTree #

fatal :: String -> SLA s n XmlTree #

spi :: String -> String -> SLA s n XmlTree #

sqattr :: QName -> String -> SLA s n XmlTree #

sattr :: String -> String -> SLA s n XmlTree #

getText :: SLA s XmlTree String #

getCharRef :: SLA s XmlTree Int #

getEntityRef :: SLA s XmlTree String #

getCmt :: SLA s XmlTree String #

getCdata :: SLA s XmlTree String #

getPiName :: SLA s XmlTree QName #

getPiContent :: SLA s XmlTree XmlTree #

getElemName :: SLA s XmlTree QName #

getAttrl :: SLA s XmlTree XmlTree #

getDTDPart :: SLA s XmlTree DTDElem #

getDTDAttrl :: SLA s XmlTree Attributes #

getAttrName :: SLA s XmlTree QName #

getErrorLevel :: SLA s XmlTree Int #

getErrorMsg :: SLA s XmlTree String #

getQName :: SLA s XmlTree QName #

getName :: SLA s XmlTree String #

getUniversalName :: SLA s XmlTree String #

getUniversalUri :: SLA s XmlTree String #

getLocalPart :: SLA s XmlTree String #

getNamePrefix :: SLA s XmlTree String #

getNamespaceUri :: SLA s XmlTree String #

getAttrValue :: String -> SLA s XmlTree String #

getAttrValue0 :: String -> SLA s XmlTree String #

getQAttrValue :: QName -> SLA s XmlTree String #

getQAttrValue0 :: QName -> SLA s XmlTree String #

changeText :: (String -> String) -> SLA s XmlTree XmlTree #

changeBlob :: (Blob -> Blob) -> SLA s XmlTree XmlTree #

changeCmt :: (String -> String) -> SLA s XmlTree XmlTree #

changeQName :: (QName -> QName) -> SLA s XmlTree XmlTree #

changeElemName :: (QName -> QName) -> SLA s XmlTree XmlTree #

changeAttrName :: (QName -> QName) -> SLA s XmlTree XmlTree #

changePiName :: (QName -> QName) -> SLA s XmlTree XmlTree #

changeAttrValue :: (String -> String) -> SLA s XmlTree XmlTree #

changeAttrl :: (XmlTrees -> XmlTrees -> XmlTrees) -> SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree #

setQName :: QName -> SLA s XmlTree XmlTree #

setElemName :: QName -> SLA s XmlTree XmlTree #

setAttrName :: QName -> SLA s XmlTree XmlTree #

setPiName :: QName -> SLA s XmlTree XmlTree #

setAttrl :: SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree #

addAttrl :: SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree #

addAttr :: String -> String -> SLA s XmlTree XmlTree #

removeAttr :: String -> SLA s XmlTree XmlTree #

removeQAttr :: QName -> SLA s XmlTree XmlTree #

processAttrl :: SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree #

processTopDownWithAttrl :: SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree #

(+=) :: SLA s b XmlTree -> SLA s b XmlTree -> SLA s b XmlTree #

xshow :: SLA s n XmlTree -> SLA s n String #

xshowBlob :: SLA s n XmlTree -> SLA s n Blob #

Category * (SLA s) # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #

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

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