Safe Haskell | None |
---|---|
Language | Haskell2010 |
Parser for AVRO (.avdl
) files, as defined in http://avro.apache.org/docs/1.8.2/spec.html.
Synopsis
- parseProtocol :: MonadParsec Char Text m => m Protocol
- readWithImports :: FilePath -> FilePath -> IO (Either Text Protocol)
- parseAliases :: MonadParsec Char Text m => m Aliases
- parseAnnotation :: MonadParsec Char Text m => m Annotation
- parseDecimal :: MonadParsec Char Text m => m Decimal
- parseImport :: MonadParsec Char Text m => m ImportType
- parseMethod :: MonadParsec Char Text m => m Method
- parseNamespace :: MonadParsec Char Text m => m Namespace
- parseOrder :: MonadParsec Char Text m => m Order
- parseSchema :: MonadParsec Char Text m => m Schema
Main parsers
parseProtocol :: MonadParsec Char Text m => m Protocol Source #
Parses a single protocol into the Protocol
structure.
Reads and parses a whole file and its imports, recursively.
Intermediate parsers
parseAliases :: MonadParsec Char Text m => m Aliases Source #
Parses aliases, which are just Lists of TypeName
.
parseAnnotation :: MonadParsec Char Text m => m Annotation Source #
Parses annotations into the Annotation
structure.
parseDecimal :: MonadParsec Char Text m => m Decimal Source #
Parses the special type decimal
into it's corresponding Decimal
structure.
parseImport :: MonadParsec Char Text m => m ImportType Source #
Parses a single import into the ImportType
structure.
parseMethod :: MonadParsec Char Text m => m Method Source #
Parses a single method/message into the Method
structure.
parseNamespace :: MonadParsec Char Text m => m Namespace Source #
Parses a single import into the ImportType
structure.
parseOrder :: MonadParsec Char Text m => m Order Source #
Parses order annotations into the Order
structure.
parseSchema :: MonadParsec Char Text m => m Schema Source #
Parses a single type respecting Data.Avro.Schema
's Schema
.