| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.People
Contents
Description
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
- fullName :: 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.
Minimal complete definition
Types
A person can have a given name, middle name(s), and surname, as well as the naming convention they use.
Instances
| Generic Person Source # | |
| HasChunkRefs Person Source # | |
| HasName Person Source # | Gets the name of a |
| Eq Person Source # | |
| type Rep Person Source # | |
Defined in Language.Drasil.People type Rep Person = D1 ('MetaData "Person" "Language.Drasil.People" "drasil-lang-0.1.60.0-GSVjWL6zqIJGx21JJ17VJN" 'False) (C1 ('MetaCons "Person" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_given") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Just "_surname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :*: (S1 ('MetaSel ('Just "_middle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [String]) :*: S1 ('MetaSel ('Just "_convention") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Conv)))) | |
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
| Generic Conv Source # | |
| HasChunkRefs Conv Source # | |
| Eq Conv Source # | |
| type Rep Conv Source # | |
Defined in Language.Drasil.People type Rep Conv = D1 ('MetaData "Conv" "Language.Drasil.People" "drasil-lang-0.1.60.0-GSVjWL6zqIJGx21JJ17VJN" 'False) (C1 ('MetaCons "Western" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Eastern" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mono" 'PrefixI 'False) (U1 :: Type -> Type))) | |
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.