drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.People

Description

Defines types and functions to encode people, names, and naming convention. Used for referencing and authorship of work.

Synopsis

Class

class HasName p Source #

Members of this class must have a name.

Minimal complete definition

nameStr

Instances

Instances details
HasName Person Source #

Gets the name of a Person. Adds a dot after any initials.

Instance details

Defined in Language.Drasil.People

Types

data Person Source #

A person can have a given name, middle name(s), and surname, as well as the naming convention they use.

Instances

Instances details
HasName Person Source #

Gets the name of a Person. Adds a dot after any initials.

Instance details

Defined in Language.Drasil.People

Eq Person Source # 
Instance details

Defined in Language.Drasil.People

Methods

(==) :: Person -> Person -> Bool #

(/=) :: Person -> Person -> Bool #

type People = [Person] Source #

People is a synonymn for many Persons.

data Conv Source #

Naming conventions.

Constructors

Western

Western style conventions are given name followed by middle names, followed by surname.

Eastern

Eastern style conventions are surname followed by middle names, followed by given name.

Mono

Mononyms are for those people who have only one name (ex. Madonna).

Instances

Instances details
Eq Conv Source # 
Instance details

Defined in Language.Drasil.People

Methods

(==) :: Conv -> Conv -> Bool #

(/=) :: Conv -> Conv -> Bool #

Constructors

person :: String -> String -> Person Source #

Constructor for a person using Western naming conventions. Used for a person with only a given name and surname. Arguments are in the order: given name, surname.

person' :: String -> String -> Person Source #

Constructor for a person using Eastern naming conventions. Used for a person with only a given name and surname. Arguments are in the order: surname, given name.

personWM :: String -> [String] -> String -> Person Source #

Constructor for a person using Western naming conventions. Similar to the person constructor, except the middle argument is a list of middle names.

personWM' :: String -> [String] -> String -> Person Source #

Constructor for a person using Eastern naming conventions. Similar to the person' constructor, except the middle argument is a list of middle names.

mononym :: String -> Person Source #

Constructor for a person with a mononym (only one name).

Accessors

name :: HasName n => n -> String Source #

Gets the name of a Person. Adds a dot after any initials.

nameStr :: HasName p => p -> String Source #

Provides the ability to hold a name.

lstName :: Person -> String Source #

Gets the last name of a Person.

rendPersLFM :: Person -> String Source #

Gets a Person's name in the form: Last, First Middle.

rendPersLFM' :: Person -> String Source #

Gets a Person's name in the form: Last, F. M.

rendPersLFM'' :: Person -> String Source #

Gets a Person's name in the form: Last, First M.

comparePeople :: [Person] -> [Person] -> Ordering Source #

Orderes different groups of Persons. If two lists are the same up to a point, the citation with more Persons will go last.