-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Parser for the GEDCOM genealogy file format.
--
-- A parser for the legacy GEDCOM 5.5 file format. GEDCOM is a widely
-- used file format in genealogy.
@package gedcom
@version 0.2.0.0
module Data.Gedcom.Internal.Common
-- | Flipped version of <$>
(<&>) :: Functor f => f a -> (a -> b) -> f b
infixl 1 <&>
-- | Replace failure with a default value
withDefault :: Alternative f => a -> f a -> f a
-- | Trim leading and trailing whitespace off a string
trim :: Text -> Text
-- | Parsers from Text using the default error component.
type Parser = Parsec Void Text
-- | Convert h:m:s.fs time to DiffTime
timeToPicos :: (Int, Int, Int, Double) -> DiffTime
-- | Parse a GEDCOM exact time value into (h, m, s, fs) format
timeValue :: Parser (Maybe (Int, Int, Int, Double))
-- | Parse a GEDCOM exact date into (day, month, year). Months are number
-- from 1 to 12.
dateExact :: Parser (Int, Word, Int)
-- | Parse a Gregorian/Julian month
month :: Parser Word
-- | Parse a French calendar month
monthFr :: Parser Word
-- | Parse a Hebrew calendar month
monthHeb :: Parser Word
-- | Parse a Gregorian year. GEDCOM allows one to specify two versions of
-- the same year for cases where the historical year started in March
-- instead of January. This function attempts to return the modern year
-- number (assuming the year starts in January.
yearGreg :: Parser Int
module Data.Gedcom.Internal.CoreTypes
-- | An error arising from dereferencing a GDRef
data GDRefError
-- | The referred structure doesn't exist.
RefNotPresent :: GDXRefID -> GDRefError
-- | Dereferenced structure had the wrong type
WrongRefType :: TypeRep -> TypeRep -> GDRefError
-- | A parse error.
data GDError
-- | A badly formatted GEDCOM line
LineFormatError :: Text -> GDError
-- | A reference where a reference wasn't allowed
UnexpectedRef :: Text -> GDError
-- | Missing a reference where a reference was required
RequiredRef :: Text -> GDError
-- | Two targets for the same reference
DuplicateRef :: Text -> GDError
-- | A badly formatted field
FormatError :: Text -> GDError
-- | The wrong tag
TagError :: Text -> GDError
-- | A reference to another structure
data GDRef a
-- | Already dereferenced.
GDStructure :: a -> GDRef a
-- | The GDXRefID to look up
GDXRef :: GDXRefID -> GDRef a
-- | A raw GEDCOM syntax tree
data GDRoot
GDRoot :: [GDTree] -> GDRoot
-- | A GEDCOM subtree
data GDTree
GDTree :: GDLine -> [GDTree] -> GDTree
-- | A GEDCOM line
data GDLine
GDLine :: GDLevel -> (Maybe GDXRefID) -> GDTag -> (Maybe GDLineValue) -> GDLine
-- | The value field
data GDLineValue
GDLineItemV :: GDLineItem -> GDLineValue
GDXRefIDV :: GDXRefID -> GDLineValue
-- | Line text
newtype GDLineItem
GDLineItem :: [(Maybe GDEscape, Text)] -> GDLineItem
-- | An escape sequence
newtype GDEscape
GDEscape :: Text -> GDEscape
-- | A cross reference ID
newtype GDXRefID
GDXRefID :: Text -> GDXRefID
-- | The tag field
newtype GDTag
GDTag :: Text -> GDTag
-- | The level field
newtype GDLevel
GDLevel :: Int -> GDLevel
-- | Extract the line text
gdLineData :: GDLineItem -> [(Maybe GDEscape, Text)]
-- | Trim white space off the start an end of a GEDCOM line text.
gdTrimLineItem :: GDLineItem -> GDLineItem
-- | Ignore escape sequences
gdIgnoreEscapes :: [(Maybe GDEscape, Text)] -> Text
-- | Ignore certain escape sequences
gdFilterEscapes :: [GDEscape] -> [(Maybe GDEscape, Text)] -> [(Maybe GDEscape, Text)]
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDRoot
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDRoot
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDTree
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDTree
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDLine
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDLine
instance GHC.Num.Num Data.Gedcom.Internal.CoreTypes.GDLevel
instance GHC.Classes.Ord Data.Gedcom.Internal.CoreTypes.GDLevel
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDLevel
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDLevel
instance GHC.Classes.Ord Data.Gedcom.Internal.CoreTypes.GDTag
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDTag
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDTag
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Gedcom.Internal.CoreTypes.GDRef a)
instance GHC.Show.Show a => GHC.Show.Show (Data.Gedcom.Internal.CoreTypes.GDRef a)
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDLineValue
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDLineValue
instance GHC.Classes.Ord Data.Gedcom.Internal.CoreTypes.GDXRefID
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDXRefID
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDXRefID
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDLineItem
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDLineItem
instance GHC.Classes.Eq Data.Gedcom.Internal.CoreTypes.GDEscape
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDEscape
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDError
instance GHC.Show.Show Data.Gedcom.Internal.CoreTypes.GDRefError
instance GHC.Base.Monoid Data.Gedcom.Internal.CoreTypes.GDLineItem
-- | This module parses a Text string into a GEDCOM syntax tree.
module Data.Gedcom.Internal.LineParser
-- | Parse the raw GEDCOM syntax tree.
gdRoot :: Parser GDRoot
-- | Parse delim.
gdDelim :: Parser (Maybe Char)
-- | This module contains monads and utility functions for extracting
-- GEDCOM records from the raw syntax tree.
module Data.Gedcom.Internal.ParseMonads
-- | A parser that extracts a GEDCOM structure from a GEDCOM subtree.
type StructureParser a = GDTree The subtree to parse. -> StructureMonad (Either GDTree a) Either parsed structure, or the subtree itself if the subtree doesn't contain the expected GEDCOM structure.
-- | A Monad for parsing GEDCOM structures out of a list of GEDCOM
-- subtrees.
data MultiMonad a
-- | Run a MultiMonad into a StructureMonad.
runMultiMonad :: [GDTree] -> MultiMonad a -> StructureMonad a
-- | Parse multiple instances of a structure
parseMulti :: StructureParser a -> MultiMonad [a]
-- | Parse an optional instance of a structure
parseOptional :: StructureParser a -> MultiMonad (Maybe a)
-- | Parse a required instance of a structure
parseRequired :: GDTag -> StructureParser a -> MultiMonad a
-- | A monad for parsing an instance of a GEDCOM structure from a GEDCOM
-- subtree.
data StructureMonad a
-- | Add a reference to the cross reference table.
addReference :: Typeable a => GDXRefID -> a -> StructureMonad ()
-- | Run a StructureMonad, returning either an error or a value, and
-- the cross reference table.
runStructure :: StructureMonad a -> (Either GDError a, Map GDXRefID Dynamic)
instance Control.Monad.Error.Class.MonadError Data.Gedcom.Internal.CoreTypes.GDError Data.Gedcom.Internal.ParseMonads.MultiMonad
instance GHC.Base.Applicative Data.Gedcom.Internal.ParseMonads.MultiMonad
instance GHC.Base.Functor Data.Gedcom.Internal.ParseMonads.MultiMonad
instance GHC.Base.Monad Data.Gedcom.Internal.ParseMonads.MultiMonad
instance Control.Monad.Error.Class.MonadError Data.Gedcom.Internal.CoreTypes.GDError Data.Gedcom.Internal.ParseMonads.StructureMonad
instance GHC.Base.Applicative Data.Gedcom.Internal.ParseMonads.StructureMonad
instance GHC.Base.Functor Data.Gedcom.Internal.ParseMonads.StructureMonad
instance GHC.Base.Monad Data.Gedcom.Internal.ParseMonads.StructureMonad
-- | This module contains the GEDCOM records. Many fields contain
-- references to other records, which can be dereferenced by
-- gdLookup
module Data.Gedcom.Structure
-- | The root structure
data Gedcom
Gedcom :: Header -> [GDRef Family] -> [GDRef Individual] -> [GDRef Multimedia] -> [GDRef Note] -> [GDRef Repository] -> [GDRef Source] -> [GDRef Submitter] -> Gedcom
[gedcomHeader] :: Gedcom -> Header
[gedcomFamily] :: Gedcom -> [GDRef Family]
[gedcomIndividual] :: Gedcom -> [GDRef Individual]
[gedcomMultimedia] :: Gedcom -> [GDRef Multimedia]
[gedcomNote] :: Gedcom -> [GDRef Note]
[gedcomRepository] :: Gedcom -> [GDRef Repository]
[gedcomSource] :: Gedcom -> [GDRef Source]
[gedcomSubmitter] :: Gedcom -> [GDRef Submitter]
-- | The header
data Header
Header :: HeaderSource -> Maybe Text -> Maybe UTCTime -> GDRef Submitter -> Maybe (GDRef Submission) -> Maybe FilePath -> Maybe Text -> GedcomFormat -> Charset -> Maybe Language -> Maybe [Text] -> Maybe Text -> Header
[headerSource] :: Header -> HeaderSource
[headerDestination] :: Header -> Maybe Text
[headerDate] :: Header -> Maybe UTCTime
[headerSubmitter] :: Header -> GDRef Submitter
[headerSubmission] :: Header -> Maybe (GDRef Submission)
[headerFile] :: Header -> Maybe FilePath
[headerCopyright] :: Header -> Maybe Text
[headerGedcomFormat] :: Header -> GedcomFormat
[headerCharset] :: Header -> Charset
[headerLang] :: Header -> Maybe Language
[headerPlaceForm] :: Header -> Maybe [Text]
[headerNote] :: Header -> Maybe Text
-- | The database format and version number
data GedcomFormat
GedcomFormat :: Text -> GedcomForm -> GedcomFormat
[gedcomVersion] :: GedcomFormat -> Text
[gedcomForm] :: GedcomFormat -> GedcomForm
-- | The actual database format. Only the default LineageLinked is
-- supported.
data GedcomForm
GedcomLineageLinked :: GedcomForm
GedcomUnsupported :: Text -> GedcomForm
-- | Where the GEDCOM data is sourced from (e.g. the program that created
-- the file)
data HeaderSource
HeaderSource :: Text -> Maybe Text -> Maybe Text -> Maybe Corp -> Maybe HeaderSourceData -> HeaderSource
[headerSourceSystemID] :: HeaderSource -> Text
[headerSourceVersion] :: HeaderSource -> Maybe Text
[headerSourceName] :: HeaderSource -> Maybe Text
[headerSourceCorp] :: HeaderSource -> Maybe Corp
[headerSourceData] :: HeaderSource -> Maybe HeaderSourceData
-- | Information about a corporation
data Corp
Corp :: Text -> Maybe Address -> Corp
[corpName] :: Corp -> Text
[corpAddress] :: Corp -> Maybe Address
-- | Information about the source of this GEDCOM data
data HeaderSourceData
HeaderSourceData :: Text -> Maybe UTCTime -> Maybe Text -> HeaderSourceData
[headerSourceDataName] :: HeaderSourceData -> Text
[headerSourceDataDate] :: HeaderSourceData -> Maybe UTCTime
[headerSourceDataCopyright] :: HeaderSourceData -> Maybe Text
-- | The family record
data Family
Family :: Maybe RestrictionNotice -> [FamilyEvent] -> Maybe (GDRef Individual) -> Maybe (GDRef Individual) -> [GDRef Individual] -> Maybe Word -> [GDRef Submitter] -> [UserReference] -> Maybe RIN -> Maybe ChangeDate -> [GDRef Note] -> [SourceCitation] -> [GDRef Multimedia] -> Family
[familyRestrictionNotice] :: Family -> Maybe RestrictionNotice
[familyEvent] :: Family -> [FamilyEvent]
[familyHusband] :: Family -> Maybe (GDRef Individual)
[familyWife] :: Family -> Maybe (GDRef Individual)
[familyChildren] :: Family -> [GDRef Individual]
[familyTotalChildren] :: Family -> Maybe Word
[familySubitter] :: Family -> [GDRef Submitter]
[familyUserReference] :: Family -> [UserReference]
[familyRIN] :: Family -> Maybe RIN
[familyChangeDate] :: Family -> Maybe ChangeDate
[familyNote] :: Family -> [GDRef Note]
[familySourceCitation] :: Family -> [SourceCitation]
[familyMultimedia] :: Family -> [GDRef Multimedia]
-- | The individual record
data Individual
Individual :: Maybe RestrictionNotice -> Maybe PersonalName -> Maybe Sex -> [IndividualEvent] -> [IndividualAttribute] -> [ChildToFamilyLink] -> [SpouseToFamilyLink] -> [GDRef Submitter] -> [Association] -> [GDRef Individual] -> [GDRef Submitter] -> [GDRef Submitter] -> Maybe RFN -> Maybe AFN -> [UserReference] -> Maybe RIN -> Maybe ChangeDate -> [GDRef Note] -> [SourceCitation] -> [GDRef Multimedia] -> Individual
[individualRestrictionNotice] :: Individual -> Maybe RestrictionNotice
[individualName] :: Individual -> Maybe PersonalName
[individualSex] :: Individual -> Maybe Sex
[individualEvent] :: Individual -> [IndividualEvent]
[individualAttribute] :: Individual -> [IndividualAttribute]
[individualChildToFamilyLink] :: Individual -> [ChildToFamilyLink]
[individualSpouseToFamilyLink] :: Individual -> [SpouseToFamilyLink]
[individualSubmitter] :: Individual -> [GDRef Submitter]
[individualAssociation] :: Individual -> [Association]
[individualAlias] :: Individual -> [GDRef Individual]
[individualAncestorInterest] :: Individual -> [GDRef Submitter]
[individualDescendantInterest] :: Individual -> [GDRef Submitter]
[individualRFN] :: Individual -> Maybe RFN
[individualAFN] :: Individual -> Maybe AFN
[individualUserReference] :: Individual -> [UserReference]
[individualRIN] :: Individual -> Maybe RIN
[individualChangeDate] :: Individual -> Maybe ChangeDate
[individualNote] :: Individual -> [GDRef Note]
[individualSourceCitation] :: Individual -> [SourceCitation]
[individualMultimedia] :: Individual -> [GDRef Multimedia]
-- | The multimedia record (for linking multimedia files)
data Multimedia
Multimedia :: [MultimediaFile] -> Maybe Text -> [UserReference] -> Maybe RIN -> [GDRef Note] -> [SourceCitation] -> Maybe ChangeDate -> Multimedia
[multimediaFile] :: Multimedia -> [MultimediaFile]
[multimediaTitl] :: Multimedia -> Maybe Text
[multimediaUserReference] :: Multimedia -> [UserReference]
[multimediaRIN] :: Multimedia -> Maybe RIN
[multimediaNote] :: Multimedia -> [GDRef Note]
[multimediaSourceCitation] :: Multimedia -> [SourceCitation]
[multimediaChangeDate] :: Multimedia -> Maybe ChangeDate
-- | The note record (for attaching notes to other records)
data Note
Note :: Text -> [UserReference] -> Maybe RIN -> [SourceCitation] -> Maybe ChangeDate -> Note
[noteText] :: Note -> Text
[noteUserReference] :: Note -> [UserReference]
[noteRIN] :: Note -> Maybe RIN
[noteSourceCitation] :: Note -> [SourceCitation]
[noteChangeDate] :: Note -> Maybe ChangeDate
-- | The repository record. Represents a repository of sources (for example
-- a collection of documents or a physical library)
data Repository
Repository :: Text -> Maybe Address -> [GDRef Note] -> [UserReference] -> Maybe RIN -> Maybe ChangeDate -> Repository
[repositoryName] :: Repository -> Text
[repositoryAddress] :: Repository -> Maybe Address
[repositoryNote] :: Repository -> [GDRef Note]
[repositoryUserReference] :: Repository -> [UserReference]
[repositoryRIN] :: Repository -> Maybe RIN
[repositoryChangeDate] :: Repository -> Maybe ChangeDate
-- | The source record. A source of information that may be cited by other
-- records.
data Source
Source :: Maybe SourceData -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> [RepositoryCitation] -> [UserReference] -> Maybe RIN -> Maybe ChangeDate -> [GDRef Note] -> [GDRef Multimedia] -> Source
[sourceData] :: Source -> Maybe SourceData
[sourceAuthor] :: Source -> Maybe Text
[sourceTitle] :: Source -> Maybe Text
[sourceShortTitle] :: Source -> Maybe Text
[sourcePublicationFacts] :: Source -> Maybe Text
[sourceText] :: Source -> Maybe Text
[sourceRepositoryCitations] :: Source -> [RepositoryCitation]
[sourceUserReference] :: Source -> [UserReference]
[sourceRIN] :: Source -> Maybe RIN
[sourceChangeDate] :: Source -> Maybe ChangeDate
[sourceNote] :: Source -> [GDRef Note]
[sourceMultimedia] :: Source -> [GDRef Multimedia]
-- | The submission record. Information about this file.
data Submission
Submission :: Maybe (GDRef Submitter) -> Maybe Text -> Maybe Text -> Maybe Word -> Maybe Word -> Maybe Bool -> Maybe RIN -> [GDRef Note] -> Maybe ChangeDate -> Submission
[submissionSubmitter] :: Submission -> Maybe (GDRef Submitter)
[submissionFamilyFile] :: Submission -> Maybe Text
[submissionTempleCode] :: Submission -> Maybe Text
[submissionAncestorGenerations] :: Submission -> Maybe Word
[submissionDescendentGenerations] :: Submission -> Maybe Word
[submissionOrdinanceProcessing] :: Submission -> Maybe Bool
[submissionRIN] :: Submission -> Maybe RIN
[submissionNote] :: Submission -> [GDRef Note]
[submissionChangeDate] :: Submission -> Maybe ChangeDate
-- | The submitter record. Information about someone who submitted data to
-- this database.
data Submitter
Submitter :: Name -> Maybe Address -> Maybe (GDRef Multimedia) -> [Language] -> Maybe RFN -> Maybe RIN -> [GDRef Note] -> Maybe ChangeDate -> Submitter
[submitterName] :: Submitter -> Name
[submitterAddress] :: Submitter -> Maybe Address
[submitterMedia] :: Submitter -> Maybe (GDRef Multimedia)
[submitterLang] :: Submitter -> [Language]
[submitterRFN] :: Submitter -> Maybe RFN
[submitterRIN] :: Submitter -> Maybe RIN
[submitterNote] :: Submitter -> [GDRef Note]
[submitterChangeDate] :: Submitter -> Maybe ChangeDate
-- | Extra data about a source.
data SourceData
SourceData :: [SourceRecordedEvent] -> Maybe Text -> [GDRef Note] -> SourceData
[sourceDataEventsRecorded] :: SourceData -> [SourceRecordedEvent]
[sourceDataAgency] :: SourceData -> Maybe Text
[sourceDataNote] :: SourceData -> [GDRef Note]
-- | Information about what events are recorded in a source.
data SourceRecordedEvent
SourceRecordedEvent :: [EventType] -> Maybe DatePeriod -> Maybe [Text] -> SourceRecordedEvent
[sourceRecordedEventType] :: SourceRecordedEvent -> [EventType]
[sourceRecordedDate] :: SourceRecordedEvent -> Maybe DatePeriod
[sourceRecordedPlace] :: SourceRecordedEvent -> Maybe [Text]
-- | An association between individuals.
data Association
Association :: GDRef Individual -> Text -> [SourceCitation] -> [GDRef Note] -> Association
[associationIndividual] :: Association -> GDRef Individual
[associationRelation] :: Association -> Text
[associationCitation] :: Association -> [SourceCitation]
[associationNote] :: Association -> [GDRef Note]
-- | A link from an individual to a family record where they are registered
-- as a child.
data ChildToFamilyLink
ChildToFamilyLink :: GDRef Family -> Maybe Pedigree -> Maybe ChildLinkStatus -> [GDRef Note] -> ChildToFamilyLink
[childLinkFamily] :: ChildToFamilyLink -> GDRef Family
[childLinkPedigree] :: ChildToFamilyLink -> Maybe Pedigree
[childLinkStatus] :: ChildToFamilyLink -> Maybe ChildLinkStatus
[childLinkNote] :: ChildToFamilyLink -> [GDRef Note]
-- | A link from an individual to a family record where they are registered
-- as a spouse.
data SpouseToFamilyLink
SpouseToFamilyLink :: GDRef Family -> [GDRef Note] -> SpouseToFamilyLink
[spouseToFamilyLinkFamily] :: SpouseToFamilyLink -> GDRef Family
[spouseToFamilyLinkNote] :: SpouseToFamilyLink -> [GDRef Note]
-- | Details about an event.
data EventDetail
EventDetail :: Maybe Text -> Maybe DateValue -> Maybe Place -> Maybe Address -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe RestrictionNotice -> [GDRef Note] -> [SourceCitation] -> [GDRef Multimedia] -> EventDetail
[eventDetailType] :: EventDetail -> Maybe Text
[eventDetailDate] :: EventDetail -> Maybe DateValue
[eventDetailPlace] :: EventDetail -> Maybe Place
[eventDetailAddress] :: EventDetail -> Maybe Address
[eventDetailAgency] :: EventDetail -> Maybe Text
[eventDetailReligion] :: EventDetail -> Maybe Text
[eventDetailCause] :: EventDetail -> Maybe Text
[eventDetailRestrictionNotice] :: EventDetail -> Maybe RestrictionNotice
[eventDetailNote] :: EventDetail -> [GDRef Note]
[eventDetailSourceCitation] :: EventDetail -> [SourceCitation]
[eventDetailMultimedia] :: EventDetail -> [GDRef Multimedia]
-- | Details about a family event.
data FamilyEventDetail
FamilyEventDetail :: Maybe Word -> Maybe Word -> EventDetail -> FamilyEventDetail
[familyEventDetailAgeHusband] :: FamilyEventDetail -> Maybe Word
[familyEventDetailAgeWife] :: FamilyEventDetail -> Maybe Word
[familyEventDetailDetail] :: FamilyEventDetail -> EventDetail
-- | An event concerning a family.
data FamilyEvent
FamilyEvent :: FamilyEventType -> FamilyEventDetail -> FamilyEvent
[familyEventType] :: FamilyEvent -> FamilyEventType
[familyEventDetail] :: FamilyEvent -> FamilyEventDetail
-- | Details about an individual event.
data IndividualEventDetail
IndividualEventDetail :: EventDetail -> Maybe Word -> IndividualEventDetail
[individualEventDetailDetail] :: IndividualEventDetail -> EventDetail
[individualEventDetailAge] :: IndividualEventDetail -> Maybe Word
-- | An event concerning an individual.
data IndividualEvent
IndividualEvent :: IndividualEventType -> IndividualEventDetail -> IndividualEvent
[individualEventType] :: IndividualEvent -> IndividualEventType
[individualEventDetail] :: IndividualEvent -> IndividualEventDetail
-- | A physical place.
data Place
Place :: [Text] -> Maybe [Text] -> Maybe PhoneticPlaceName -> Maybe RomanPlaceName -> Maybe MapCoord -> [GDRef Note] -> Place
[placeName] :: Place -> [Text]
[placeForm] :: Place -> Maybe [Text]
[placePhonetic] :: Place -> Maybe PhoneticPlaceName
[placeRoman] :: Place -> Maybe RomanPlaceName
[placeMap] :: Place -> Maybe MapCoord
[placeNote] :: Place -> [GDRef Note]
-- | The name of a person.
data PersonalName
PersonalName :: Name -> Maybe NameType -> PersonalNamePieces -> [PhoneticName] -> [RomanizedName] -> PersonalName
[personalNameName] :: PersonalName -> Name
[personalNameType] :: PersonalName -> Maybe NameType
[personalNamePieces] :: PersonalName -> PersonalNamePieces
[personalNamePhonetic] :: PersonalName -> [PhoneticName]
[personalNameRoman] :: PersonalName -> [RomanizedName]
-- | A phonetic transcription of a person's name.
data PhoneticName
PhoneticName :: Name -> PhoneticType -> PersonalNamePieces -> PhoneticName
[phoneticName] :: PhoneticName -> Name
[phoneticType] :: PhoneticName -> PhoneticType
[phoneticPieces] :: PhoneticName -> PersonalNamePieces
-- | A Roman transliteration of a person's name.
data RomanizedName
RomanizedName :: Name -> RomanType -> PersonalNamePieces -> RomanizedName
[romanziedName] :: RomanizedName -> Name
[romanziedType] :: RomanizedName -> RomanType
[romanziedPieces] :: RomanizedName -> PersonalNamePieces
-- | Parts of a person's name.
data PersonalNamePieces
PersonalNamePieces :: [Text] -> [Text] -> [Text] -> [Text] -> [Text] -> [Text] -> [GDRef Note] -> [SourceCitation] -> PersonalNamePieces
-- | Parts of the name that precede the other names. Example from the
-- GEDCOM standard (prefix highlighted in bold):
--
-- Lt. Cmndr. Joseph Allen jr.
[namePiecePrefix] :: PersonalNamePieces -> [Text]
-- | Given names
[namePieceGiven] :: PersonalNamePieces -> [Text]
-- | Nicknames
[namePieceNickname] :: PersonalNamePieces -> [Text]
-- | Surname prefixes. Example from the GEDCOM standard (surname prefix
-- highlighted in bold):
--
-- de la Cruz
[namePieceSurnamePrefix] :: PersonalNamePieces -> [Text]
-- | Surname or family names
[namePieceSurname] :: PersonalNamePieces -> [Text]
-- | Parts of the name that come after all other names. Example from the
-- GEDCOM standard (suffix highlighted in bold)
--
-- Lt. Cmndr. Joseph Allen jr.
[namePieceSuffix] :: PersonalNamePieces -> [Text]
[namePieceNameNote] :: PersonalNamePieces -> [GDRef Note]
[namePirceSourceCitation] :: PersonalNamePieces -> [SourceCitation]
-- | Extra information about an individual.
data IndividualAttribute
IndividualAttribute :: IndividualAttributeType -> (IndividualEventDetail) -> IndividualAttribute
-- | Classification of extra information about an individual.
data IndividualAttributeType
-- | Caste.
Caste :: Text -> IndividualAttributeType
-- | Physical description of the individual.
PhysicalDescription :: Text -> IndividualAttributeType
-- | Scholastic achievement.
Education :: Text -> IndividualAttributeType
-- | National id number.
NationalID :: Text -> IndividualAttributeType
-- | National or tribal origin.
NationalOrigin :: Text -> IndividualAttributeType
-- | Number of children.
NChildren :: Word -> IndividualAttributeType
-- | Number of marriages.
NMarriages :: Word -> IndividualAttributeType
-- | Occupation.
Occupation :: Text -> IndividualAttributeType
-- | Property the individual owned.
Possessions :: Text -> IndividualAttributeType
-- | Religious affiliation.
Religion :: Text -> IndividualAttributeType
-- | Place of residence.
ResidesAt :: IndividualAttributeType
-- | Social security number.
SocialSecurity :: Text -> IndividualAttributeType
-- | Title of nobility.
Title :: Text -> IndividualAttributeType
-- | None of the above.
Fact :: Text -> IndividualAttributeType
-- | Citation of source material.
data SourceCitation
SourceCitation :: Either SourceDescription (GDRef Source) -> Maybe Text -> [GDRef Multimedia] -> [GDRef Note] -> Maybe QualityAssessment -> SourceCitation
-- | Either a description of the source, or a reference to a Source
-- record which describes the source in more detail.
[citeSource] :: SourceCitation -> Either SourceDescription (GDRef Source)
[citePage] :: SourceCitation -> Maybe Text
[citeMultimedia] :: SourceCitation -> [GDRef Multimedia]
[citeNote] :: SourceCitation -> [GDRef Note]
[citeQuality] :: SourceCitation -> Maybe QualityAssessment
-- | Citation of a repository of source material.
data RepositoryCitation
RepositoryCitation :: Maybe (GDRef Repository) -> [GDRef Note] -> Maybe CallNumber -> RepositoryCitation
[repoCiteRepository] :: RepositoryCitation -> Maybe (GDRef Repository)
[repoCiteNote] :: RepositoryCitation -> [GDRef Note]
[repoCiteCallNumber] :: RepositoryCitation -> Maybe CallNumber
-- | An address
data Address
Address :: Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> ContactDetails -> Address
[addressLines] :: Address -> Text
[addressCity] :: Address -> Maybe Text
[addressState] :: Address -> Maybe Text
[addressPostcode] :: Address -> Maybe Text
[addressCountry] :: Address -> Maybe Text
[addressContact] :: Address -> ContactDetails
-- | Contact details associated with an Address
data ContactDetails
ContactDetails :: [Text] -> [Text] -> [Text] -> [Text] -> ContactDetails
[addressPhone] :: ContactDetails -> [Text]
[addressEmail] :: ContactDetails -> [Text]
[addressFax] :: ContactDetails -> [Text]
[addressWWW] :: ContactDetails -> [Text]
-- | Information about a multimedia file
data MultimediaFile
MultimediaFile :: Text -> MultimediaFormat -> Maybe Text -> MultimediaFile
[multimediaFileLink] :: MultimediaFile -> Text
[multimediaFileFormat] :: MultimediaFile -> MultimediaFormat
[multimediaTitle] :: MultimediaFile -> Maybe Text
-- | Information about a multimedia format.
data MultimediaFormat
MultimediaFormat :: MultimediaFileFormat -> (Maybe MultimediaType) -> MultimediaFormat
-- | Supported multimedia file formats.
data MultimediaFileFormat
MF_BMP :: MultimediaFileFormat
MF_GIF :: MultimediaFileFormat
MF_JPG :: MultimediaFileFormat
MF_OLE :: MultimediaFileFormat
MF_PCX :: MultimediaFileFormat
MF_TIF :: MultimediaFileFormat
MF_WAV :: MultimediaFileFormat
-- | Any other file type.
MF_OTHER :: Text -> MultimediaFileFormat
-- | The kind of multimedia (not necessarily a computer file).
data MultimediaType
MT_AUDIO :: MultimediaType
MT_BOOK :: MultimediaType
MT_CARD :: MultimediaType
MT_ELECTRONIC :: MultimediaType
MT_FICHE :: MultimediaType
MT_FILM :: MultimediaType
MT_MAGAZINE :: MultimediaType
MT_MANUSCRIPT :: MultimediaType
MT_MAP :: MultimediaType
MT_NEWSPAPER :: MultimediaType
MT_PHOTO :: MultimediaType
MT_TOMBSTONE :: MultimediaType
MT_VIDEO :: MultimediaType
-- | Any other kind of multimedia.
MT_OTHER :: Text -> MultimediaType
-- | Name types.
data NameType
AKA :: NameType
BirthName :: NameType
Immigrant :: NameType
Maiden :: NameType
Married :: NameType
-- | Any other kind of name.
NameType :: Text -> NameType
-- | Dates, including date ranges and approximate dates.
data DateValue
DateV :: Date -> DateValue
DateApproxV :: DateApprox -> DateValue
DatePeriodV :: DatePeriod -> DateValue
DateRangeV :: DateRange -> DateValue
-- | A date in a format that doesn't fit the other categories. May include
-- an interpretation in the optional Date field.
DatePhrase :: (Maybe Date) -> Text -> DateValue
-- | A date that is only approximately known.
data DateApprox
DateAbout :: Date -> DateApprox
DateCalculated :: Date -> DateApprox
DateEstimated :: Date -> DateApprox
-- | A range of dates.
data DateRange
DateBefore :: Date -> DateRange
DateAfter :: Date -> DateRange
DateBetween :: Date -> Date -> DateRange
-- | Recognised types of events concerning families.
data FamilyEventType
Annuled :: FamilyEventType
FamCensus :: FamilyEventType
Divorce :: FamilyEventType
DivorceFiled :: FamilyEventType
Engagement :: FamilyEventType
MarriageBann :: FamilyEventType
MarriageContract :: FamilyEventType
Marriage :: FamilyEventType
MarriageLicense :: FamilyEventType
MarriageSettlement :: FamilyEventType
Residence :: FamilyEventType
-- | Any other kind of event.
FamilyEventType :: Text -> FamilyEventType
-- | Recognised types of events concerning individuals.
data IndividualEventType
Birth :: (Maybe (GDRef Family)) -> IndividualEventType
Christening :: (Maybe (GDRef Family)) -> IndividualEventType
Death :: IndividualEventType
Burial :: IndividualEventType
Cremation :: IndividualEventType
Adoption :: (Maybe AdoptionDetail) -> IndividualEventType
Baptism :: IndividualEventType
BarMitzvah :: IndividualEventType
BasMitzvah :: IndividualEventType
Blessing :: IndividualEventType
ChristeningAdult :: IndividualEventType
Confirmation :: IndividualEventType
FirstCommunion :: IndividualEventType
Ordination :: IndividualEventType
Naturalization :: IndividualEventType
Emigration :: IndividualEventType
Immigration :: IndividualEventType
IndvCensus :: IndividualEventType
Probate :: IndividualEventType
Will :: IndividualEventType
Graduation :: IndividualEventType
Retirement :: IndividualEventType
-- | Any other kind of event.
IndividualEventType :: Text -> IndividualEventType
-- | Recognised event types.
data EventType
-- | Family of individual census.
Census :: EventType
-- | A family event
FamilyEventTypeV :: FamilyEventType -> EventType
-- | An individual event
IndividualEventTypeV :: IndividualEventType -> EventType
-- | Some other kind of event.
EventType :: Text -> EventType
-- | Information about an adoption, including the family the subject was
-- adopted into and which parent(s) adopted the child.
data AdoptionDetail
AdoptionDetail :: (GDRef Family) -> (Maybe Parent) -> AdoptionDetail
-- | A calendar
data Calendar
Gregorian :: Calendar
Julian :: Calendar
Hebrew :: Calendar
French :: Calendar
-- | A call number for citations
data CallNumber
CallNumber :: Text -> (Maybe MultimediaType) -> CallNumber
-- | The date a record was last changed
data ChangeDate
ChangeDate :: UTCTime -> (Maybe (GDRef Note)) -> ChangeDate
-- | A character set and optional version (the version is unused so far as
-- I am aware)
data Charset
Charset :: Text -> (Maybe Text) -> Charset
-- | Metadata about a child link
data ChildLinkStatus
Challenged :: ChildLinkStatus
Disproved :: ChildLinkStatus
Proven :: ChildLinkStatus
-- | A date. The format is day / month / year and months are numbered 1 to
-- 12 (or 1 to 13 for certain calendars).
data Date
Date :: Calendar -> (Maybe Word) -> (Maybe Word) -> Year -> Date
-- | A range of dates
data DatePeriod
-- | A range of dates with a start date and optional end date.
DateFrom :: Date -> (Maybe Date) -> DatePeriod
-- | A range of dates with only the end date specified.
DateTo :: Date -> DatePeriod
-- | A global location in longitude and latitude.
data MapCoord
MapCoord :: Longitude -> Latitude -> MapCoord
-- | 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)
data Name
Name :: Text -> (Maybe Text) -> Name
-- | Which parent?
data Parent
Husband :: Parent
Wife :: Parent
BothParents :: Parent
-- | How a child is associated with his/her family.
data Pedigree
Adopted :: Pedigree
ByBirth :: Pedigree
Foster :: Pedigree
Sealing :: Pedigree
-- | A phonetic transcription of a place name.
data PhoneticPlaceName
PhoneticPlaceName :: PhoneticType -> [Text] -> PhoneticPlaceName
-- | The type of phonetic transcription.
data PhoneticType
-- | Japanese kana
Kana :: PhoneticType
-- | Korean hanguel
Hangul :: PhoneticType
-- | Something else
PhoneticType :: Text -> PhoneticType
-- | Privacy restrictions associated with a record.
data RestrictionNotice
Confidential :: RestrictionNotice
Locked :: RestrictionNotice
Privacy :: RestrictionNotice
-- | A Roman transliteration of a place name.
data RomanPlaceName
RomanPlaceName :: RomanType -> [Text] -> RomanPlaceName
-- | The type of Roman transliteration.
data RomanType
-- | Chinese Pinyin
Pinyin :: RomanType
-- | Japanese Romaji
Romaji :: RomanType
-- | Chinese Wade-Giles
WadeGiles :: RomanType
-- | Something else
RomanType :: Text -> RomanType
-- | Sex.
data Sex
Male :: Sex
Female :: Sex
Undetermined :: Sex
-- | Description of a source. The first field contains a description of the
-- source. The second field contains sections of text from the source.
data SourceDescription
SourceDescription :: Text -> [Text] -> SourceDescription
-- | Custom reference added by the creator of this file. The format of this
-- reference is not standardized.
data UserReference
UserReference :: Text -> (Maybe Text) -> UserReference
-- | Part of the GEDCOM standard, but only for LDS use so far as I am
-- aware.
newtype AFN
AFN :: Text -> AFN
-- | A natural language.
newtype Language
Language :: Text -> Language
-- | Latitude
newtype Latitude
Latitude :: Double -> Latitude
-- | Longitude
newtype Longitude
Longitude :: Double -> Longitude
-- | Assessment of the quality of a source. A number from 0 to 3 with 0
-- indicating unreliable information and 3 being direct primary evidence.
newtype QualityAssessment
QualityAssessment :: Word -> QualityAssessment
-- | Part of the GEDCOM standard, but only for LDS use so far as I am
-- aware.
newtype RFN
RFN :: Text -> RFN
-- | 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."
newtype RIN
RIN :: Text -> RIN
-- | A year in some calendar. May be negative.
newtype Year
Year :: Int -> Year
instance GHC.Show.Show Data.Gedcom.Structure.Gedcom
instance GHC.Show.Show Data.Gedcom.Structure.Header
instance GHC.Show.Show Data.Gedcom.Structure.Submission
instance GHC.Show.Show Data.Gedcom.Structure.Association
instance GHC.Show.Show Data.Gedcom.Structure.ChildToFamilyLink
instance GHC.Show.Show Data.Gedcom.Structure.SpouseToFamilyLink
instance GHC.Show.Show Data.Gedcom.Structure.IndividualEvent
instance GHC.Show.Show Data.Gedcom.Structure.PhoneticName
instance GHC.Show.Show Data.Gedcom.Structure.RomanizedName
instance GHC.Show.Show Data.Gedcom.Structure.PersonalNamePieces
instance GHC.Show.Show Data.Gedcom.Structure.PersonalName
instance GHC.Show.Show Data.Gedcom.Structure.IndividualEventDetail
instance GHC.Show.Show Data.Gedcom.Structure.IndividualAttribute
instance GHC.Show.Show Data.Gedcom.Structure.Submitter
instance GHC.Show.Show Data.Gedcom.Structure.Multimedia
instance GHC.Show.Show Data.Gedcom.Structure.Place
instance GHC.Show.Show Data.Gedcom.Structure.EventDetail
instance GHC.Show.Show Data.Gedcom.Structure.FamilyEventDetail
instance GHC.Show.Show Data.Gedcom.Structure.FamilyEvent
instance GHC.Show.Show Data.Gedcom.Structure.Family
instance GHC.Show.Show Data.Gedcom.Structure.AdoptionDetail
instance GHC.Show.Show Data.Gedcom.Structure.IndividualEventType
instance GHC.Show.Show Data.Gedcom.Structure.EventType
instance GHC.Show.Show Data.Gedcom.Structure.SourceRecordedEvent
instance GHC.Show.Show Data.Gedcom.Structure.SourceData
instance GHC.Show.Show Data.Gedcom.Structure.Repository
instance GHC.Show.Show Data.Gedcom.Structure.RepositoryCitation
instance GHC.Show.Show Data.Gedcom.Structure.Source
instance GHC.Show.Show Data.Gedcom.Structure.SourceCitation
instance GHC.Show.Show Data.Gedcom.Structure.Note
instance GHC.Show.Show Data.Gedcom.Structure.ChangeDate
instance GHC.Show.Show Data.Gedcom.Structure.Individual
instance GHC.Show.Show Data.Gedcom.Structure.RFN
instance GHC.Show.Show Data.Gedcom.Structure.AFN
instance GHC.Show.Show Data.Gedcom.Structure.RIN
instance GHC.Show.Show Data.Gedcom.Structure.DateValue
instance GHC.Show.Show Data.Gedcom.Structure.DateApprox
instance GHC.Show.Show Data.Gedcom.Structure.DateRange
instance GHC.Show.Show Data.Gedcom.Structure.DatePeriod
instance GHC.Show.Show Data.Gedcom.Structure.Date
instance GHC.Show.Show Data.Gedcom.Structure.Year
instance GHC.Show.Show Data.Gedcom.Structure.QualityAssessment
instance GHC.Show.Show Data.Gedcom.Structure.MapCoord
instance GHC.Show.Show Data.Gedcom.Structure.Longitude
instance GHC.Show.Show Data.Gedcom.Structure.Latitude
instance GHC.Show.Show Data.Gedcom.Structure.Language
instance GHC.Show.Show Data.Gedcom.Structure.UserReference
instance GHC.Show.Show Data.Gedcom.Structure.SourceDescription
instance GHC.Show.Show Data.Gedcom.Structure.Sex
instance GHC.Show.Show Data.Gedcom.Structure.RomanPlaceName
instance GHC.Show.Show Data.Gedcom.Structure.RomanType
instance GHC.Show.Show Data.Gedcom.Structure.RestrictionNotice
instance GHC.Show.Show Data.Gedcom.Structure.PhoneticPlaceName
instance GHC.Show.Show Data.Gedcom.Structure.PhoneticType
instance GHC.Show.Show Data.Gedcom.Structure.Pedigree
instance GHC.Show.Show Data.Gedcom.Structure.Parent
instance GHC.Show.Show Data.Gedcom.Structure.Name
instance GHC.Show.Show Data.Gedcom.Structure.ChildLinkStatus
instance GHC.Show.Show Data.Gedcom.Structure.Charset
instance GHC.Show.Show Data.Gedcom.Structure.CallNumber
instance GHC.Show.Show Data.Gedcom.Structure.Calendar
instance GHC.Show.Show Data.Gedcom.Structure.FamilyEventType
instance GHC.Show.Show Data.Gedcom.Structure.NameType
instance GHC.Show.Show Data.Gedcom.Structure.MultimediaFile
instance GHC.Show.Show Data.Gedcom.Structure.MultimediaFormat
instance GHC.Show.Show Data.Gedcom.Structure.MultimediaType
instance GHC.Show.Show Data.Gedcom.Structure.MultimediaFileFormat
instance GHC.Show.Show Data.Gedcom.Structure.HeaderSource
instance GHC.Show.Show Data.Gedcom.Structure.Corp
instance GHC.Show.Show Data.Gedcom.Structure.Address
instance GHC.Show.Show Data.Gedcom.Structure.ContactDetails
instance GHC.Show.Show Data.Gedcom.Structure.IndividualAttributeType
instance GHC.Show.Show Data.Gedcom.Structure.HeaderSourceData
instance GHC.Show.Show Data.Gedcom.Structure.GedcomFormat
instance GHC.Classes.Eq Data.Gedcom.Structure.GedcomForm
instance GHC.Show.Show Data.Gedcom.Structure.GedcomForm
-- | These parsers extract the GEDCOM records from the raw syntax tree.
module Data.Gedcom.Internal.Parser
-- | Parse a Gedcom value from the raw GEDCOM syntax tree.
parseGedcom :: GDRoot -> (Either GDError Gedcom, Map GDXRefID Dynamic)
-- | Parse a Header.
parseHeader :: StructureParser Header
-- | Parse a boolean value.
parseBoolTag :: GDTag -> StructureParser Bool
-- | Parse a Word value.
parseWordTag :: GDTag -> StructureParser Word
-- | Extract the text from a tag.
parseTextTag :: GDTag -> StructureParser Text
-- | Extract a list of comma separated values from a tag.
parseListTag :: GDTag -> StructureParser [Text]
-- | Parse a tag which is either a GEDCOM structure, or a reference to the
-- expected GEDCOM structure.
parseTag :: Typeable a => GDTag -> NoLinkHandler a -> StructureParser (GDRef a)
-- | Parse a tag which must contain a cross reference to another structure,
-- not the structure itself.
parseLinkTag :: Typeable a => GDTag -> StructureParser (GDRef 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).
parseNoLinkTag :: Typeable a => GDTag -> NoLinkHandler a -> StructureParser a
-- | ANSEL https://en.wikipedia.org/wiki/ANSEL is a character set
-- and associated encodings intended for bibliographic purposes. GEDCOM
-- files use the 8-bit ANSEL encoding by default, so we need a way to
-- decode it. ANSEL has combining diacritics, but they precede the
-- character that they modify (Unicode has it the other way around). This
-- means that the code points must be reordered when converting to
-- Unicode.
module Data.Text.Encoding.ANSEL
-- | Decode an ANSEL string to Unicode
decodeANSEL :: ByteString -> Text
module Data.Gedcom
-- | Parse Gedcom data from a ByteString
parseGedcomString :: Maybe String -> ByteString -> Either GDError (Gedcom, XRefTable)
-- | Parse Gedcom data from a file
parseGedcomFile :: FilePath -> IO (Either GDError (Gedcom, XRefTable))
-- | A parse error.
data GDError
-- | A badly formatted GEDCOM line
LineFormatError :: Text -> GDError
-- | A reference where a reference wasn't allowed
UnexpectedRef :: Text -> GDError
-- | Missing a reference where a reference was required
RequiredRef :: Text -> GDError
-- | Two targets for the same reference
DuplicateRef :: Text -> GDError
-- | A badly formatted field
FormatError :: Text -> GDError
-- | The wrong tag
TagError :: Text -> GDError
-- | Lookup up a reference in the cross reference table
gdLookup :: forall a. Typeable a => GDRef a -> XRefTable -> Either GDRefError a
-- | A reference to another structure
data GDRef a
-- | A table of cross references
data XRefTable
-- | An error arising from dereferencing a GDRef
data GDRefError
-- | The referred structure doesn't exist.
RefNotPresent :: GDXRefID -> GDRefError
-- | Dereferenced structure had the wrong type
WrongRefType :: TypeRep -> TypeRep -> GDRefError
-- | A cross reference ID
data GDXRefID
instance GHC.Show.Show Data.Gedcom.XRefTable