Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines types and functions to encode people, names, and naming convention. Used for referencing and authorship of work.
Synopsis
- class HasName p
- data Person
- type People = [Person]
- data Conv
- person :: String -> String -> Person
- person' :: String -> String -> Person
- personWM :: String -> [String] -> String -> Person
- personWM' :: String -> [String] -> String -> Person
- mononym :: String -> Person
- name :: HasName n => n -> String
- nameStr :: HasName p => p -> String
- lstName :: Person -> String
- rendPersLFM :: Person -> String
- rendPersLFM' :: Person -> String
- rendPersLFM'' :: Person -> String
- comparePeople :: [Person] -> [Person] -> Ordering
Class
Members of this class must have a name.
Types
A person can have a given name, middle name(s), and surname, as well as the naming convention they use.
Naming conventions.
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.