Copyright | (c) Callum Lowcay 2017 |
---|---|
License | BSD3 |
Maintainer | cwslowcay@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
- parseGedcomString :: Maybe String -> ByteString -> Either GDError (Gedcom, XRefTable)
- parseGedcomFile :: FilePath -> IO (Either GDError (Gedcom, XRefTable))
- data GDError
- gdLookup :: forall a. Typeable a => GDRef a -> XRefTable -> Either GDRefError a
- data GDRef a
- data XRefTable
- data GDRefError
- data GDXRefID
- module Data.Gedcom.Structure
Functions
:: Maybe String | The filename from which the string was read |
-> ByteString | The string to parse |
-> Either GDError (Gedcom, XRefTable) | The Gedcom data and cross reference table, or an error |
Parse Gedcom data from a ByteString
:: FilePath | The file to read |
-> IO (Either GDError (Gedcom, XRefTable)) | The Gedcom data and cross reference table, or an error |
Parse Gedcom data from a file
A parse error.
LineFormatError Text | A badly formatted GEDCOM line |
UnexpectedRef Text | A reference where a reference wasn't allowed |
RequiredRef Text | Missing a reference where a reference was required |
DuplicateRef Text | Two targets for the same reference |
FormatError Text | A badly formatted field |
TagError Text | The wrong tag |
:: Typeable a | |
=> GDRef a | The reference to look up |
-> XRefTable | The table to look up in |
-> Either GDRefError a | The value or an error |
Lookup up a reference in the cross reference table
A reference to another structure
data GDRefError Source #
An error arising from dereferencing a GDRef
RefNotPresent GDXRefID | The referred structure doesn't exist. |
WrongRefType TypeRep TypeRep | Dereferenced structure had the wrong type |
A cross reference ID
module Data.Gedcom.Structure