polysoup-0.6.3: Online XML parsing with polyparse and tagsoup

Safe HaskellSafe
LanguageHaskell98

Text.XML.PolySoup.Predicate

Description

A generic extracting predicate.

Synopsis

Documentation

newtype Q a b Source #

A predicate checks if the given element satisfies some properties and extracts its attribute values. You can compose predicates using Functor, Applicative and Alternative operators: *>, <*, <|> etc. Note, that it doesn't really have sense to use function like many or some, since the extracting predicate doesn't consume any input.

Constructors

Q 

Fields

Instances

Functor (Q a) Source # 

Methods

fmap :: (a -> b) -> Q a a -> Q a b #

(<$) :: a -> Q a b -> Q a a #

Applicative (Q a) Source # 

Methods

pure :: a -> Q a a #

(<*>) :: Q a (a -> b) -> Q a a -> Q a b #

(*>) :: Q a a -> Q a b -> Q a b #

(<*) :: Q a a -> Q a b -> Q a a #

Alternative (Q a) Source # 

Methods

empty :: Q a a #

(<|>) :: Q a a -> Q a a -> Q a a #

some :: Q a a -> Q a [a] #

many :: Q a a -> Q a [a] #

true :: Q a a Source #

Predicate which is always satisfied.

satisfy :: (a -> Bool) -> Q a a Source #

Check if the given predicate is satisfied.