Copyright | (c) Martin Zeller, 2016 |
---|---|
License | BSD2 |
Maintainer | Martin Zeller <mz.bremerhaven@gmail.com> |
Stability | experimental |
Portability | ScopedTypeVariables |
Safe Haskell | Safe |
Language | Haskell2010 |
- filterDocument :: forall a. (Document a -> Bool) -> Document a -> Maybe (Document a)
- squashDocument :: Monoid a => Document a -> Document a
- getContent :: Monoid a => Document a -> a
- squashDocumentOn :: forall a. Monoid a => (Document a -> Bool) -> Document a -> Document a
- lookupDocument :: forall a. Text -> Document a -> [Document a]
- lookupDocument' :: forall a. Text -> Document a -> [Document a]
Documentation
:: (Document a -> Bool) | Predicate to check |
-> Document a | Document to filter |
-> Maybe (Document a) | Returns |
Filter documents according to some predicate.
Similar to filter
in the Prelude.
getContent :: Monoid a => Document a -> a Source #
squashDocumentOn :: forall a. Monoid a => (Document a -> Bool) -> Document a -> Document a Source #
Squash all contents of a Document
which matches the predicate
See also squashDocument
Looks up nested Document
s with a particular identifier.
NB: Will not recurse into matching documents.
Similar to lookupDocument
, lookupDocument'
will find a Document
with
a particular identifier. This, however, will only find immediate children and
will not recurse.