| Copyright | (c) Martin Zeller, 2016 |
|---|---|
| License | BSD2 |
| Maintainer | Martin Zeller <mz.bremerhaven@gmail.com> |
| Stability | experimental |
| Portability | ScopedTypeVariables |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Text.ABNF.Document.Operations
Description
- filterDocument :: forall a. (Document a -> Bool) -> Document a -> Maybe (Document a)
- squashDocument :: Monoid a => Document a -> Document a
- squashDocumentOn :: forall a. Monoid a => (Document a -> Bool) -> Document a -> Document a
- squashContent :: Monoid a => [Content a] -> a
Documentation
Arguments
| :: (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.
squashDocument :: Monoid a => Document a -> Document 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
squashContent :: Monoid a => [Content a] -> a Source
Squash all contents using the Monoid instance of a, cascading into
NonTerminals.