Copyright | (c) Callum Lowcay 2017 |
---|---|
License | BSD3 |
Maintainer | cwslowcay@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
These parsers extract the GEDCOM records from the raw syntax tree.
- parseGedcom :: GDRoot -> (Either GDError Gedcom, Map GDXRefID Dynamic)
- parseHeader :: StructureParser Header
- parseBoolTag :: GDTag -> StructureParser Bool
- parseWordTag :: GDTag -> StructureParser Word
- parseTextTag :: GDTag -> StructureParser Text
- parseListTag :: GDTag -> StructureParser [Text]
- parseTag :: Typeable a => GDTag -> NoLinkHandler a -> StructureParser (GDRef a)
- parseLinkTag :: Typeable a => GDTag -> StructureParser (GDRef a)
- parseNoLinkTag :: Typeable a => GDTag -> NoLinkHandler a -> StructureParser a
Documentation
parseGedcom :: GDRoot -> (Either GDError Gedcom, Map GDXRefID Dynamic) Source #
Parse a Gedcom
value from the raw GEDCOM syntax tree.
parseHeader :: StructureParser Header Source #
Parse a Header
.
parseBoolTag :: GDTag -> StructureParser Bool Source #
Parse a boolean value.
parseWordTag :: GDTag -> StructureParser Word Source #
Parse a Word value.
parseTextTag :: GDTag -> StructureParser Text Source #
Extract the text from a tag.
parseListTag :: GDTag -> StructureParser [Text] Source #
Extract a list of comma separated values from a tag.
:: Typeable a | |
=> GDTag | The tag to parse. |
-> NoLinkHandler a | A handler for the tag |
-> StructureParser (GDRef a) |
Parse a tag which is either a GEDCOM structure, or a reference to the expected GEDCOM structure.
parseLinkTag :: Typeable a => GDTag -> StructureParser (GDRef a) Source #
Parse a tag which must contain a cross reference to another structure, not the structure itself.
:: Typeable a | |
=> GDTag | The tag to parse. |
-> NoLinkHandler a | A handler for the tag. |
-> StructureParser a |
Parse a tag which cannot contain a cross reference (i.e. the tag must contain the structure itself, not a reference to another structure).