family-tree-0.5.1: A family tree library for the Haskell programming language.

Maintainernvd124@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Data.FamilyTree

Contents

Description

This module is for Family Trees.

It uses lenses for the manipulation of people. For the usage of lenses, see Control.Lens

It is reccomended to use Data.Binary to do saving and loading.

Synopsis

Types

Main types

data FamilyTree Source

The core structure of a family tree.

Other types

data Location Source

The Location type. Either a coordinate or a placename.

data Relationship Source

The Relationship type. Marriage is the default for similarity to GEDCOM.

Constructors

Marriage 
Other Text 

Functions

Creation

newTree :: Text -> FamilyTree Source

Creates a new tree with a given name.

addPerson :: FamilyTree -> (Int, FamilyTree) Source

Adds a person with minimal information, returning the updated family tree and the ID of the new person.

addFamily :: FamilyTree -> (Int, FamilyTree) Source

Adds a family with minimal information, returning the updated family tree and the ID of the new family.

Manipulation

class FamilyTreePart part where Source

Methods

accessFT :: Int -> IndexedTraversal' Int FamilyTree part Source

accessFT is a Traversal to the part of the family tree (either a Person or a Family)

Destruction

deletePerson :: Int -> FamilyTree -> FamilyTree Source

Deletes a person from the family tree, removing all references to them.

deleteFamily :: Int -> FamilyTree -> FamilyTree Source

Deletes a family from the family tree, removing all references to it.

Utility functions