Copyright | (c) Callum Lowcay 2017 |
---|---|
License | BSD3 |
Maintainer | cwslowcay@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
- data GDRefError
- data GDError
- data GDRef a
- = GDStructure a
- | GDXRef GDXRefID
- data GDRoot = GDRoot [GDTree]
- data GDTree = GDTree GDLine [GDTree]
- data GDLine = GDLine GDLevel (Maybe GDXRefID) GDTag (Maybe GDLineValue)
- data GDLineValue
- newtype GDLineItem = GDLineItem [(Maybe GDEscape, Text)]
- newtype GDEscape = GDEscape Text
- newtype GDXRefID = GDXRefID Text
- newtype GDTag = GDTag Text
- newtype GDLevel = GDLevel Int
- gdLineData :: GDLineItem -> [(Maybe GDEscape, Text)]
- gdTrimLineItem :: GDLineItem -> GDLineItem
- gdIgnoreEscapes :: [(Maybe GDEscape, Text)] -> Text
- gdFilterEscapes :: [GDEscape] -> [(Maybe GDEscape, Text)] -> [(Maybe GDEscape, Text)]
Documentation
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 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 |
A reference to another structure
GDStructure a | Already dereferenced. |
GDXRef GDXRefID | The |
A GEDCOM line
data GDLineValue Source #
The value field
An escape sequence
A cross reference ID
The tag field
The level field
gdLineData :: GDLineItem -> [(Maybe GDEscape, Text)] Source #
Extract the line text
gdTrimLineItem :: GDLineItem -> GDLineItem Source #
Trim white space off the start an end of a GEDCOM line text.