gedcom-0.1.0.0: Parser for the GEDCOM genealogy file format.

Copyright(c) Callum Lowcay 2017
LicenseBSD3
Maintainercwslowcay@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Data.Gedcom

Contents

Description

 

Synopsis

Functions

parseGedcomString Source #

Arguments

:: 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

parseGedcomFile Source #

Arguments

:: 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

data GDError Source #

A parse error.

Constructors

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

Instances

gdLookup Source #

Arguments

:: 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

data GDRef a Source #

A reference to another structure

Instances

Show a => Show (GDRef a) Source # 

Methods

showsPrec :: Int -> GDRef a -> ShowS #

show :: GDRef a -> String #

showList :: [GDRef a] -> ShowS #

data XRefTable Source #

A table of cross references

data GDRefError Source #

An error arising from dereferencing a GDRef

Constructors

RefNotPresent GDXRefID

The referred structure doesn't exist.

WrongRefType TypeRep TypeRep

Dereferenced structure had the wrong type

Top level structures

data GedcomFormat Source #

The database format and version number

data GedcomForm Source #

The actual database format. Only the default LineageLinked is supported.

data HeaderSource Source #

Where the GEDCOM data is sourced from (e.g. the program that created the file)

data Corp Source #

Information about a corporation

Constructors

Corp 

Instances

Records

data Note Source #

The note record (for attaching notes to other records)

Instances

data Repository Source #

The repository record. Represents a repository of sources (for example a collection of documents or a physical library)

data Submitter Source #

The submitter record. Information about someone who submitted data to this database.

Substructures

data ChildToFamilyLink Source #

A link from an individual to a family record where they are registered as a child.

data SpouseToFamilyLink Source #

A link from an individual to a family record where they are registered as a spouse.

data PhoneticName Source #

A phonetic transcription of a person's name.

data RomanizedName Source #

A Roman transliteration of a person's name.

data PersonalNamePieces Source #

Parts of a person's name.

Constructors

PersonalNamePieces 

Fields

data IndividualAttributeType Source #

Classification of extra information about an individual.

Constructors

Caste Text

Caste.

PhysicalDescription Text

Physical description of the individual.

Education Text

Scholastic achievement.

NationalID Text

National id number.

NationalOrigin Text

National or tribal origin.

NChildren Word

Number of children.

NMarriages Word

Number of marriages.

Occupation Text

Occupation.

Possessions Text

Property the individual owned.

Religion Text

Religious affiliation.

ResidesAt

Place of residence.

SocialSecurity Text

Social security number.

Title Text

Title of nobility.

Fact Text

None of the above.

data SourceCitation Source #

Citation of source material.

Constructors

SourceCitation 

Fields

data ContactDetails Source #

Contact details associated with an Address

Constructors

ContactDetails 

Values

data MultimediaType Source #

The kind of multimedia (not necessarily a computer file).

data NameType Source #

Name types.

Constructors

AKA 
BirthName 
Immigrant 
Maiden 
Married 
NameType Text

Any other kind of name.

data DateValue Source #

Dates, including date ranges and approximate dates.

Constructors

DateV Date 
DateApproxV DateApprox 
DatePeriodV DatePeriod 
DateRangeV DateRange 
DatePhrase (Maybe Date) Text

A date in a format that doesn't fit the other categories. May include an interpretation in the optional Date field.

data DateApprox Source #

A date that is only approximately known.

data EventType Source #

Recognised event types.

Constructors

Census

Family of individual census.

FamilyEventTypeV FamilyEventType

A family event

IndividualEventTypeV IndividualEventType

An individual event

EventType Text

Some other kind of event.

data AdoptionDetail Source #

Information about an adoption, including the family the subject was adopted into and which parent(s) adopted the child.

data Calendar Source #

A calendar

Constructors

Gregorian 
Julian 
Hebrew 
French 

data CallNumber Source #

A call number for citations

data ChangeDate Source #

The date a record was last changed

Constructors

ChangeDate UTCTime (Maybe (GDRef Note)) 

data Charset Source #

A character set and optional version (the version is unused so far as I am aware)

Constructors

Charset Text (Maybe Text) 

Instances

data Date Source #

A date. The format is day / month / year and months are numbered 1 to 12 (or 1 to 13 for certain calendars).

Constructors

Date Calendar (Maybe Word) (Maybe Word) Year 

Instances

data DatePeriod Source #

A range of dates

Constructors

DateFrom Date (Maybe Date)

A range of dates with a start date and optional end date.

DateTo Date

A range of dates with only the end date specified.

data MapCoord Source #

A global location in longitude and latitude.

data Name Source #

A personal name. The first field is the full name of the individual. The second field contains just the surname of the individual (or Nothing if unspecified)

Constructors

Name Text (Maybe Text) 

Instances

data Parent Source #

Which parent?

Constructors

Husband 
Wife 
BothParents 

Instances

data Pedigree Source #

How a child is associated with his/her family.

Constructors

Adopted 
ByBirth 
Foster 
Sealing 

data PhoneticPlaceName Source #

A phonetic transcription of a place name.

data PhoneticType Source #

The type of phonetic transcription.

Constructors

Kana

Japanese kana

Hangul

Korean hanguel

PhoneticType Text

Something else

data RestrictionNotice Source #

Privacy restrictions associated with a record.

Constructors

Confidential 
Locked 
Privacy 

data RomanPlaceName Source #

A Roman transliteration of a place name.

Constructors

RomanPlaceName RomanType [Text] 

data RomanType Source #

The type of Roman transliteration.

Constructors

Pinyin

Chinese Pinyin

Romaji

Japanese Romaji

WadeGiles

Chinese Wade-Giles

RomanType Text

Something else

data Sex Source #

Sex.

Constructors

Male 
Female 
Undetermined 

Instances

Show Sex Source # 

Methods

showsPrec :: Int -> Sex -> ShowS #

show :: Sex -> String #

showList :: [Sex] -> ShowS #

data SourceDescription Source #

Description of a source. The first field contains a description of the source. The second field contains sections of text from the source.

Constructors

SourceDescription Text [Text] 

data UserReference Source #

Custom reference added by the creator of this file. The format of this reference is not standardized.

Constructors

UserReference Text (Maybe Text) 

newtype AFN Source #

Part of the GEDCOM standard, but only for LDS use so far as I am aware.

Constructors

AFN Text 

Instances

Show AFN Source # 

Methods

showsPrec :: Int -> AFN -> ShowS #

show :: AFN -> String #

showList :: [AFN] -> ShowS #

newtype Language Source #

A natural language.

Constructors

Language Text 

newtype Latitude Source #

Latitude

Constructors

Latitude Double 

newtype Longitude Source #

Longitude

Constructors

Longitude Double 

newtype QualityAssessment Source #

Assessment of the quality of a source. A number from 0 to 3 with 0 indicating unreliable information and 3 being direct primary evidence.

Constructors

QualityAssessment Word 

newtype RFN Source #

Part of the GEDCOM standard, but only for LDS use so far as I am aware.

Constructors

RFN Text 

Instances

Show RFN Source # 

Methods

showsPrec :: Int -> RFN -> ShowS #

show :: RFN -> String #

showList :: [RFN] -> ShowS #

newtype RIN Source #

Automated Record ID. From the GEDCOM standard:

"This number is intended to serve as a more sure means of identification of a record for reconciling differences in data between two interfacing systems."

Constructors

RIN Text 

Instances

Show RIN Source # 

Methods

showsPrec :: Int -> RIN -> ShowS #

show :: RIN -> String #

showList :: [RIN] -> ShowS #

newtype Year Source #

A year in some calendar. May be negative.

Constructors

Year Int 

Instances