Text.Roundtrip.Xml.Parser
- data GenXmlParser s m a
- type XmlParser a = GenXmlParser [RtEventWithPos] Identity a
- runXmlParser :: SourceName -> EntityRenderer -> [Event] -> XmlParser a -> Either ParseError a
- runXmlParser' :: EntityRenderer -> [EventWithPos] -> XmlParser a -> Either ParseError a
- runXmlParser'' :: SourceName -> EntityRenderer -> [EventWithPos] -> XmlParser a -> Either ParseError a
- data WithPos a
- type EventWithPos = WithPos Event
- eventWithPos :: a -> SourceName -> Line -> Column -> WithPos a
- eventWithoutPos :: a -> WithPos a
- type SourceName = String
- type Line = Int
- type Column = Int
- data ParseError
- type EntityRenderer = Text -> Maybe Text
- defaultEntityRenderer :: EntityRenderer
Documentation
data GenXmlParser s m a Source
Instances
| (Monad m, Stream s m RtEventWithPos) => ProductFunctor (GenXmlParser s m) | |
| (Monad m, Stream s m RtEventWithPos) => Alternative (GenXmlParser s m) | |
| (Monad m, Stream s m RtEventWithPos) => Syntax (GenXmlParser s m) | |
| (Monad m, Stream s m RtEventWithPos) => IsoFunctor (GenXmlParser s m) | |
| (Monad m, Stream s m RtEventWithPos) => XmlSyntax (GenXmlParser s m) |
type XmlParser a = GenXmlParser [RtEventWithPos] Identity aSource
runXmlParser :: SourceName -> EntityRenderer -> [Event] -> XmlParser a -> Either ParseError aSource
runXmlParser' :: EntityRenderer -> [EventWithPos] -> XmlParser a -> Either ParseError aSource
runXmlParser'' :: SourceName -> EntityRenderer -> [EventWithPos] -> XmlParser a -> Either ParseError aSource
type EventWithPos = WithPos EventSource
eventWithPos :: a -> SourceName -> Line -> Column -> WithPos aSource
eventWithoutPos :: a -> WithPos aSource
type SourceName = String
data ParseError
The abstract data type ParseError represents parse errors. It
provides the source position (SourcePos) of the error
and a list of error messages (Message). A ParseError
can be returned by the function Text.Parsec.Prim.parse. ParseError is an
instance of the Show class.
Instances
type EntityRenderer = Text -> Maybe TextSource