citeproc-0.8.1.1: Generates citations and bibliography from CSL styles.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Citeproc.Types

Synopsis

- data CiteprocOptions = CiteprocOptions {
  - linkCitations :: Bool
  - linkBibliography :: Bool
  }
- defaultCiteprocOptions :: CiteprocOptions
- class (Semigroup a, Monoid a, Show a, Eq a, Ord a) => CiteprocOutput a where
  - toText :: a -> Text
  - fromText :: Text -> a
  - dropTextWhile :: (Char -> Bool) -> a -> a
  - dropTextWhileEnd :: (Char -> Bool) -> a -> a
  - addFontVariant :: FontVariant -> a -> a
  - addFontStyle :: FontStyle -> a -> a
  - addFontWeight :: FontWeight -> a -> a
  - addTextDecoration :: TextDecoration -> a -> a
  - addVerticalAlign :: VerticalAlign -> a -> a
  - addTextCase :: Maybe Lang -> TextCase -> a -> a
  - addDisplay :: DisplayStyle -> a -> a
  - addQuotes :: a -> a
  - movePunctuationInsideQuotes :: a -> a
  - inNote :: a -> a
  - mapText :: (Text -> Text) -> a -> a
  - addHyperlink :: Text -> a -> a
  - localizeQuotes :: Locale -> a -> a
- addFormatting :: CiteprocOutput a => Formatting -> a -> a
- data CiteprocError
  - = CiteprocXMLError Text
  - | CiteprocParseError Text
  - | CiteprocLocaleNotFound Text
- prettyCiteprocError :: CiteprocError -> Text
- newtype ItemId = ItemId {
  - unItemId :: Text
  }
- data CitationItem a = CitationItem {
  - citationItemId :: ItemId
  - citationItemLabel :: Maybe Text
  - citationItemLocator :: Maybe Text
  - citationItemType :: CitationItemType
  - citationItemPrefix :: Maybe a
  - citationItemSuffix :: Maybe a
  - citationItemData :: Maybe (Reference a)
  }
- data CitationItemType
  - = AuthorOnly
  - | SuppressAuthor
  - | NormalCite
- data Citation a = Citation {
  - citationId :: Maybe Text
  - citationNoteNumber :: Maybe Int
  - citationItems :: [CitationItem a]
  }
- data ElementType a
  - = EText TextType
  - | EDate Variable DateType (Maybe ShowDateParts) [DP]
  - | ENumber Variable NumberForm
  - | ENames [Variable] NamesFormat [Element a]
  - | ELabel Variable TermForm Pluralize
  - | EGroup Bool [Element a]
  - | EChoose [(Match, [Condition], [Element a])]
- data Element a = Element (ElementType a) Formatting
- data NumberForm
  - = NumberNumeric
  - | NumberOrdinal
  - | NumberLongOrdinal
  - | NumberRoman
- data Pluralize
  - = ContextualPluralize
  - | AlwaysPluralize
  - | NeverPluralize
- data DateType
  - = LocalizedNumeric
  - | LocalizedText
  - | NonLocalized
- data Date = Date {
  - dateParts :: [DateParts]
  - dateCirca :: Bool
  - dateSeason :: Maybe Int
  - dateLiteral :: Maybe Text
  }
- rawDateEDTF :: Text -> Maybe Date
- newtype DateParts = DateParts [Int]
- data ShowDateParts
  - = YearMonthDay
  - | YearMonth
  - | Year
- data DPName
  - = DPYear
  - | DPMonth
  - | DPDay
- data DPForm
  - = DPNumeric
  - | DPNumericLeadingZeros
  - | DPOrdinal
  - | DPLong
  - | DPShort
- data DP = DP {
  - dpName :: DPName
  - dpForm :: DPForm
  - dpRangeDelimiter :: Text
  - dpFormatting :: Formatting
  }
- data VariableForm
  - = ShortForm
  - | LongForm
- data TextType
  - = TextVariable VariableForm Variable
  - | TextMacro Text
  - | TextTerm Term
  - | TextValue Text
- data NameFormat = NameFormat {
  - nameGivenFormatting :: Maybe Formatting
  - nameFamilyFormatting :: Maybe Formatting
  - nameAndStyle :: Maybe TermForm
  - nameDelimiter :: Text
  - nameDelimiterPrecedesEtAl :: DelimiterPrecedes
  - nameDelimiterPrecedesLast :: DelimiterPrecedes
  - nameEtAlMin :: Maybe Int
  - nameEtAlUseFirst :: Maybe Int
  - nameEtAlSubsequentUseFirst :: Maybe Int
  - nameEtAlSubsequentMin :: Maybe Int
  - nameEtAlUseLast :: Bool
  - nameForm :: NameForm
  - nameInitialize :: Bool
  - nameInitializeWith :: Maybe Text
  - nameAsSortOrder :: Maybe NameAsSortOrder
  - nameSortSeparator :: Text
  }
- defaultNameFormat :: NameFormat
- data NameAsSortOrder
  - = NameAsSortOrderFirst
  - | NameAsSortOrderAll
- data NamesFormat = NamesFormat {
  - namesLabel :: Maybe (TermForm, Pluralize, Formatting)
  - namesEtAl :: Maybe (Text, Formatting)
  - namesName :: Maybe (NameFormat, Formatting)
  - namesLabelBeforeName :: Bool
  }
- data NameForm
  - = LongName
  - | ShortName
  - | CountName
- data Name = Name {
  - nameFamily :: Maybe Text
  - nameGiven :: Maybe Text
  - nameDroppingParticle :: Maybe Text
  - nameNonDroppingParticle :: Maybe Text
  - nameSuffix :: Maybe Text
  - nameCommaSuffix :: Bool
  - nameStaticOrdering :: Bool
  - nameLiteral :: Maybe Text
  }
- extractParticles :: Name -> Name
- isByzantineName :: Name -> Bool
- data DelimiterPrecedes
  - = PrecedesContextual
  - | PrecedesAfterInvertedName
  - | PrecedesAlways
  - | PrecedesNever
- data Condition
  - = HasVariable Variable
  - | HasType Text
  - | IsUncertainDate Variable
  - | IsNumeric Variable
  - | HasLocatorType Variable
  - | HasPosition Position
  - | WouldDisambiguate
- data Position
  - = FirstPosition
  - | IbidWithLocator
  - | Ibid
  - | NearNote
  - | Subsequent
- data Match
  - = MatchAll
  - | MatchAny
  - | MatchNone
- data Formatting = Formatting {
  - formatLang :: Maybe Lang
  - formatFontStyle :: Maybe FontStyle
  - formatFontVariant :: Maybe FontVariant
  - formatFontWeight :: Maybe FontWeight
  - formatTextDecoration :: Maybe TextDecoration
  - formatVerticalAlign :: Maybe VerticalAlign
  - formatPrefix :: Maybe Text
  - formatSuffix :: Maybe Text
  - formatDisplay :: Maybe DisplayStyle
  - formatTextCase :: Maybe TextCase
  - formatDelimiter :: Maybe Text
  - formatStripPeriods :: Bool
  - formatQuotes :: Bool
  - formatAffixesInside :: Bool
  }
- data FontStyle
  - = NormalFont
  - | ItalicFont
  - | ObliqueFont
- data FontVariant
  - = NormalVariant
  - | SmallCapsVariant
- data FontWeight
  - = NormalWeight
  - | BoldWeight
  - | LightWeight
- data TextDecoration
  - = NoDecoration
  - | UnderlineDecoration
- data VerticalAlign
  - = BaselineAlign
  - | SupAlign
  - | SubAlign
- data DisplayStyle
  - = DisplayBlock
  - | DisplayLeftMargin
  - | DisplayRightInline
  - | DisplayIndent
- data TextCase
  - = Lowercase
  - | Uppercase
  - | CapitalizeFirst
  - | CapitalizeAll
  - | SentenceCase
  - | TitleCase
- data DemoteNonDroppingParticle
  - = DemoteDisplayAndSort
  - | DemoteSortOnly
  - | DemoteNever
- data StyleOptions = StyleOptions {
  - styleIsNoteStyle :: Bool
  - styleDefaultLocale :: Maybe Lang
  - styleDemoteNonDroppingParticle :: DemoteNonDroppingParticle
  - styleInitializeWithHyphen :: Bool
  - stylePageRangeFormat :: Maybe PageRangeFormat
  - stylePageRangeDelimiter :: Maybe Text
  - styleDisambiguation :: DisambiguationStrategy
  - styleNearNoteDistance :: Maybe Int
  - styleCiteGroupDelimiter :: Maybe Text
  - styleLineSpacing :: Maybe Int
  - styleEntrySpacing :: Maybe Int
  - styleHangingIndent :: Bool
  - styleSecondFieldAlign :: Maybe SecondFieldAlign
  - styleSubsequentAuthorSubstitute :: Maybe SubsequentAuthorSubstitute
  - styleUsesYearSuffixVariable :: Bool
  }
- data SubsequentAuthorSubstitute = SubsequentAuthorSubstitute Text SubsequentAuthorSubstituteRule
- data SubsequentAuthorSubstituteRule
  - = CompleteAll
  - | CompleteEach
  - | PartialEach
  - | PartialFirst
- data SecondFieldAlign
  - = SecondFieldAlignFlush
  - | SecondFieldAlignMargin
- data PageRangeFormat
  - = PageRangeChicago15
  - | PageRangeChicago16
  - | PageRangeExpanded
  - | PageRangeMinimal
  - | PageRangeMinimalTwo
- data Style a = Style {
  - styleCslVersion :: (Int, Int, Int)
  - styleOptions :: StyleOptions
  - styleCitation :: Layout a
  - styleBibliography :: Maybe (Layout a)
  - styleLocales :: [Locale]
  - styleAbbreviations :: Maybe Abbreviations
  }
- data TermMatch
  - = LastDigit
  - | LastTwoDigits
  - | WholeNumber
- data TermGender
  - = Masculine
  - | Feminine
- data TermNumber
  - = Singular
  - | Plural
- data TermForm
  - = Long
  - | Short
  - | Verb
  - | VerbShort
  - | Symbol
- data Term = Term {
  - termName :: Text
  - termForm :: TermForm
  - termNumber :: Maybe TermNumber
  - termGender :: Maybe TermGender
  - termGenderForm :: Maybe TermGender
  - termMatch :: Maybe TermMatch
  }
- emptyTerm :: Term
- data SortDirection
  - = Ascending
  - | Descending
- data SortKey a
  - = SortKeyVariable SortDirection Variable
  - | SortKeyMacro SortDirection [Element a]
- data SortKeyValue = SortKeyValue SortDirection (Maybe [Text])
- data LayoutOptions = LayoutOptions {
  - layoutCollapse :: Maybe Collapsing
  - layoutYearSuffixDelimiter :: Maybe Text
  - layoutAfterCollapseDelimiter :: Maybe Text
  }
- data Collapsing
  - = CollapseCitationNumber
  - | CollapseYear
  - | CollapseYearSuffix
  - | CollapseYearSuffixRanged
- data Layout a = Layout {
  - layoutOptions :: LayoutOptions
  - layoutFormatting :: Formatting
  - layoutElements :: [Element a]
  - layoutSortKeys :: [SortKey a]
  }
- data DisambiguationStrategy = DisambiguationStrategy {
  - disambiguateAddNames :: Bool
  - disambiguateAddGivenNames :: Maybe GivenNameDisambiguationRule
  - disambiguateAddYearSuffix :: Bool
  }
- data GivenNameDisambiguationRule
  - = AllNames
  - | AllNamesWithInitials
  - | PrimaryName
  - | PrimaryNameWithInitials
  - | ByCite
- data Lang = Lang {
  - langLanguage :: Text
  - langScript :: Maybe Text
  - langRegion :: Maybe Text
  - langVariants :: [Text]
  - langExtensions :: [(Text, [(Text, Text)])]
  - langPrivateUse :: [Text]
  }
- parseLang :: Text -> Either String Lang
- renderLang :: Lang -> Text
- data Locale = Locale {
  - localeLanguage :: Maybe Lang
  - localePunctuationInQuote :: Maybe Bool
  - localeLimitDayOrdinalsToDay1 :: Maybe Bool
  - localeDate :: Map DateType (Element Text)
  - localeTerms :: Map Text [(Term, Text)]
  }
- data DisambiguationData = DisambiguationData {
  - disambYearSuffix :: Maybe Int
  - disambNameMap :: Map Name NameHints
  - disambEtAlNames :: Maybe Int
  - disambCondition :: Bool
  }
- data NameHints
  - = AddInitials
  - | AddGivenName
  - | AddInitialsIfPrimary
  - | AddGivenNameIfPrimary
- data Reference a = Reference {
  - referenceId :: ItemId
  - referenceType :: Text
  - referenceDisambiguation :: Maybe DisambiguationData
  - referenceVariables :: Map Variable (Val a)
  }
- newtype ReferenceMap a = ReferenceMap {
  - unReferenceMap :: Map ItemId (Reference a)
  }
- makeReferenceMap :: [Reference a] -> ([Reference a], ReferenceMap a)
- lookupReference :: ItemId -> ReferenceMap a -> Maybe (Reference a)
- data Val a
  - = TextVal Text
  - | FancyVal a
  - | NumVal Int
  - | NamesVal [Name]
  - | DateVal Date
  - | SubstitutedVal
- valToText :: CiteprocOutput a => Val a -> Maybe Text
- data Variable
- toVariable :: Text -> Variable
- fromVariable :: Variable -> Text
- lookupVariable :: CiteprocOutput a => Variable -> Reference a -> Maybe (Val a)
- data Output a
  - = Formatted Formatting [Output a]
  - | Linked Text [Output a]
  - | InNote (Output a)
  - | Literal a
  - | Tagged Tag (Output a)
  - | NullOutput
- data Identifier
  - = IdentDOI Text
  - | IdentPMCID Text
  - | IdentPMID Text
  - | IdentURL Text
- identifierToURL :: Identifier -> Text
- fixShortDOI :: Text -> Text
- data Tag
  - = TagTerm Term
  - | TagCitationNumber Int
  - | TagCitationLabel
  - | TagTitle
  - | TagItem CitationItemType ItemId
  - | TagName Name
  - | TagNames Variable NamesFormat [Name]
  - | TagDate Date
  - | TagYearSuffix Int
  - | TagLocator
  - | TagPrefix
  - | TagSuffix
- outputToText :: CiteprocOutput a => Output a -> Text
- renderOutput :: CiteprocOutput a => CiteprocOptions -> Output a -> a
- grouped :: [Output a] -> Output a
- formatted :: Formatting -> [Output a] -> Output a
- readAsInt :: Text -> Maybe Int
- variableType :: Variable -> VariableType
- data VariableType
  - = DateVariable
  - | NameVariable
  - | NumberVariable
  - | StringVariable
  - | UnknownVariable
- data Abbreviations
- lookupAbbreviation :: CiteprocOutput a => Variable -> Val a -> Abbreviations -> Maybe (Val a)
- data Result a = Result {
  - resultCitations :: [a]
  - resultBibliography :: [(Text, a)]
  - resultWarnings :: [Text]
  }
- data Inputs a = Inputs {
  - inputsCitations :: Maybe [Citation a]
  - inputsReferences :: Maybe [Reference a]
  - inputsStyle :: Maybe Text
  - inputsAbbreviations :: Maybe Abbreviations
  - inputsLang :: Maybe Lang
  }

# Documentation

data CiteprocOptions Source #

Options affecting the output in ways that go beyond what can be specified in styles.

Constructors

CiteprocOptions |

Fields

- linkCitations :: Bool

  Create hyperlinks from citations to bibliography entries

- linkBibliography :: Bool

  Enables the following options:

  - Automatically linkify any DOI, PMCID, PMID, or URL appearing in a bibliography entry.
  - When a bibliography entry has a DOI, PMCID, PMID, or URL available (in order of priority), but the style does not explicitly render at least one of them, add a hyperlink to the title instead.
  - A bibliography item with a DOI, PMCID, PMID, or URL available (in order of priority) will be wrapped in a hyperlink when the hyperlink has not already been applied to one of its parts (e.g. to the title).

#### Instances

Instances details

Show CiteprocOptions Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> CiteprocOptions -> ShowS Source # show :: CiteprocOptions -> String Source # showList :: [CiteprocOptions] -> ShowS Source #
Eq CiteprocOptions Source # |
Instance details Defined in Citeproc.Types Methods (==) :: CiteprocOptions -> CiteprocOptions -> Bool Source # (/=) :: CiteprocOptions -> CiteprocOptions -> Bool Source #

defaultCiteprocOptions :: CiteprocOptions Source #

class (Semigroup a, Monoid a, Show a, Eq a, Ord a) => CiteprocOutput a where Source #

CSL styles require certain formatting transformations to be defined. These are defined in the `CiteprocOutput` class. The library may be used with any structured format that defines these operations. See the `CslJson` module for an instance that corresponds to the markup allowed in CSL JSON. See the `Pandoc` module for an instance for Pandoc `Inlines`.

Methods

toText :: a -> Text Source #

fromText :: Text -> a Source #

dropTextWhile :: (Char -> Bool) -> a -> a Source #

dropTextWhileEnd :: (Char -> Bool) -> a -> a Source #

addFontVariant :: FontVariant -> a -> a Source #

addFontStyle :: FontStyle -> a -> a Source #

addFontWeight :: FontWeight -> a -> a Source #

addTextDecoration :: TextDecoration -> a -> a Source #

addVerticalAlign :: VerticalAlign -> a -> a Source #

addTextCase :: Maybe Lang -> TextCase -> a -> a Source #

addDisplay :: DisplayStyle -> a -> a Source #

addQuotes :: a -> a Source #

movePunctuationInsideQuotes :: a -> a Source #

inNote :: a -> a Source #

mapText :: (Text -> Text) -> a -> a Source #

addHyperlink :: Text -> a -> a Source #

localizeQuotes :: Locale -> a -> a Source #

#### Instances

Instances details

CiteprocOutput Inlines Source # |

Instance details

Defined in Citeproc.Pandoc

Methods

toText :: Inlines -> Text Source #

fromText :: Text -> Inlines Source #

dropTextWhile :: (Char -> Bool) -> Inlines -> Inlines Source #

dropTextWhileEnd :: (Char -> Bool) -> Inlines -> Inlines Source #

addFontVariant :: FontVariant -> Inlines -> Inlines Source #

addFontStyle :: FontStyle -> Inlines -> Inlines Source #

addFontWeight :: FontWeight -> Inlines -> Inlines Source #

addTextDecoration :: TextDecoration -> Inlines -> Inlines Source #

addVerticalAlign :: VerticalAlign -> Inlines -> Inlines Source #

addTextCase :: Maybe Lang -> TextCase -> Inlines -> Inlines Source #

addDisplay :: DisplayStyle -> Inlines -> Inlines Source #

addQuotes :: Inlines -> Inlines Source #

movePunctuationInsideQuotes :: Inlines -> Inlines Source #

inNote :: Inlines -> Inlines Source #

mapText :: (Text -> Text) -> Inlines -> Inlines Source #

addHyperlink :: Text -> Inlines -> Inlines Source #

localizeQuotes :: Locale -> Inlines -> Inlines Source #

CiteprocOutput (CslJson Text) Source # |

Instance details

Defined in Citeproc.CslJson

Methods

toText :: CslJson Text -> Text Source #

fromText :: Text -> CslJson Text Source #

dropTextWhile :: (Char -> Bool) -> CslJson Text -> CslJson Text Source #

dropTextWhileEnd :: (Char -> Bool) -> CslJson Text -> CslJson Text Source #

addFontVariant :: FontVariant -> CslJson Text -> CslJson Text Source #

addFontStyle :: FontStyle -> CslJson Text -> CslJson Text Source #

addFontWeight :: FontWeight -> CslJson Text -> CslJson Text Source #

addTextDecoration :: TextDecoration -> CslJson Text -> CslJson Text Source #

addVerticalAlign :: VerticalAlign -> CslJson Text -> CslJson Text Source #

addTextCase :: Maybe Lang -> TextCase -> CslJson Text -> CslJson Text Source #

addDisplay :: DisplayStyle -> CslJson Text -> CslJson Text Source #

addQuotes :: CslJson Text -> CslJson Text Source #

movePunctuationInsideQuotes :: CslJson Text -> CslJson Text Source #

inNote :: CslJson Text -> CslJson Text Source #

mapText :: (Text -> Text) -> CslJson Text -> CslJson Text Source #

addHyperlink :: Text -> CslJson Text -> CslJson Text Source #

localizeQuotes :: Locale -> CslJson Text -> CslJson Text Source #

addFormatting :: CiteprocOutput a => Formatting -> a -> a Source #

data CiteprocError Source #

Constructors

CiteprocXMLError Text |
CiteprocParseError Text |
CiteprocLocaleNotFound Text |

#### Instances

Instances details

Show CiteprocError Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> CiteprocError -> ShowS Source # show :: CiteprocError -> String Source # showList :: [CiteprocError] -> ShowS Source #
Eq CiteprocError Source # |
Instance details Defined in Citeproc.Types Methods (==) :: CiteprocError -> CiteprocError -> Bool Source # (/=) :: CiteprocError -> CiteprocError -> Bool Source #

prettyCiteprocError :: CiteprocError -> Text Source #

newtype ItemId Source #

The identifier used to identify a work in a bibliographic database.

Constructors

ItemId |

Fields

- unItemId :: Text

#### Instances

Instances details

FromJSON ItemId Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser ItemId Source # parseJSONList :: Value -> Parser [ItemId] Source #
ToJSON ItemId Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: ItemId -> Value Source # toEncoding :: ItemId -> Encoding Source # toJSONList :: [ItemId] -> Value Source # toEncodingList :: [ItemId] -> Encoding Source #
Monoid ItemId Source # |
Instance details Defined in Citeproc.Types Methods mempty :: ItemId Source # mappend :: ItemId -> ItemId -> ItemId Source # mconcat :: [ItemId] -> ItemId Source #
Semigroup ItemId Source # |
Instance details Defined in Citeproc.Types Methods (<>) :: ItemId -> ItemId -> ItemId Source # sconcat :: NonEmpty ItemId -> ItemId Source # stimes :: Integral b => b -> ItemId -> ItemId Source #
Show ItemId Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> ItemId -> ShowS Source # show :: ItemId -> String Source # showList :: [ItemId] -> ShowS Source #
Eq ItemId Source # |
Instance details Defined in Citeproc.Types Methods (==) :: ItemId -> ItemId -> Bool Source # (/=) :: ItemId -> ItemId -> Bool Source #
Ord ItemId Source # |
Instance details Defined in Citeproc.Types Methods compare :: ItemId -> ItemId -> Ordering Source # (<) :: ItemId -> ItemId -> Bool Source # (<=) :: ItemId -> ItemId -> Bool Source # (>) :: ItemId -> ItemId -> Bool Source # (>=) :: ItemId -> ItemId -> Bool Source # max :: ItemId -> ItemId -> ItemId Source # min :: ItemId -> ItemId -> ItemId Source #

data CitationItem a Source #

The part of a citation corresponding to a single work, possibly including a label, locator, prefix and suffix.

Constructors

CitationItem |

Fields

- citationItemId :: ItemId
- citationItemLabel :: Maybe Text
- citationItemLocator :: Maybe Text
- citationItemType :: CitationItemType
- citationItemPrefix :: Maybe a
- citationItemSuffix :: Maybe a
- citationItemData :: Maybe (Reference a)

#### Instances

Instances details

(FromJSON a, Eq a) => FromJSON (CitationItem a) Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (CitationItem a) Source # parseJSONList :: Value -> Parser [CitationItem a] Source #
ToJSON a => ToJSON (CitationItem a) Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: CitationItem a -> Value Source # toEncoding :: CitationItem a -> Encoding Source # toJSONList :: [CitationItem a] -> Value Source # toEncodingList :: [CitationItem a] -> Encoding Source #
Show a => Show (CitationItem a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> CitationItem a -> ShowS Source # show :: CitationItem a -> String Source # showList :: [CitationItem a] -> ShowS Source #
Eq a => Eq (CitationItem a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: CitationItem a -> CitationItem a -> Bool Source # (/=) :: CitationItem a -> CitationItem a -> Bool Source #
Ord a => Ord (CitationItem a) Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: CitationItem a -> CitationItem a -> Ordering Source #

(<) :: CitationItem a -> CitationItem a -> Bool Source #

(<=) :: CitationItem a -> CitationItem a -> Bool Source #

(>) :: CitationItem a -> CitationItem a -> Bool Source #

(>=) :: CitationItem a -> CitationItem a -> Bool Source #

max :: CitationItem a -> CitationItem a -> CitationItem a Source #

min :: CitationItem a -> CitationItem a -> CitationItem a Source #

data CitationItemType Source #

Constructors

AuthorOnly | e.g., Smith
SuppressAuthor | e.g., (2000, p. 30)
NormalCite | e.g., (Smith 2000, p. 30)

#### Instances

Instances details

FromJSON CitationItemType Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser CitationItemType Source # parseJSONList :: Value -> Parser [CitationItemType] Source #
ToJSON CitationItemType Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: CitationItemType -> Value Source # toEncoding :: CitationItemType -> Encoding Source # toJSONList :: [CitationItemType] -> Value Source # toEncodingList :: [CitationItemType] -> Encoding Source #
Show CitationItemType Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> CitationItemType -> ShowS Source # show :: CitationItemType -> String Source # showList :: [CitationItemType] -> ShowS Source #
Eq CitationItemType Source # |
Instance details Defined in Citeproc.Types Methods (==) :: CitationItemType -> CitationItemType -> Bool Source # (/=) :: CitationItemType -> CitationItemType -> Bool Source #
Ord CitationItemType Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: CitationItemType -> CitationItemType -> Ordering Source #

(<) :: CitationItemType -> CitationItemType -> Bool Source #

(<=) :: CitationItemType -> CitationItemType -> Bool Source #

(>) :: CitationItemType -> CitationItemType -> Bool Source #

(>=) :: CitationItemType -> CitationItemType -> Bool Source #

max :: CitationItemType -> CitationItemType -> CitationItemType Source #

min :: CitationItemType -> CitationItemType -> CitationItemType Source #

data Citation a Source #

A citation (which may include several items, e.g. in `(Smith 2000; Jones 2010, p. 30)`).

Constructors

Citation |

Fields

- citationId :: Maybe Text
- citationNoteNumber :: Maybe Int
- citationItems :: [CitationItem a]

#### Instances

Instances details

(FromJSON a, Eq a) => FromJSON (Citation a) Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (Citation a) Source # parseJSONList :: Value -> Parser [Citation a] Source #
ToJSON a => ToJSON (Citation a) Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Citation a -> Value Source # toEncoding :: Citation a -> Encoding Source # toJSONList :: [Citation a] -> Value Source # toEncodingList :: [Citation a] -> Encoding Source #
Show a => Show (Citation a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Citation a -> ShowS Source # show :: Citation a -> String Source # showList :: [Citation a] -> ShowS Source #
Eq a => Eq (Citation a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Citation a -> Citation a -> Bool Source # (/=) :: Citation a -> Citation a -> Bool Source #
Ord a => Ord (Citation a) Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: Citation a -> Citation a -> Ordering Source #

(<) :: Citation a -> Citation a -> Bool Source #

(<=) :: Citation a -> Citation a -> Bool Source #

(>) :: Citation a -> Citation a -> Bool Source #

(>=) :: Citation a -> Citation a -> Bool Source #

max :: Citation a -> Citation a -> Citation a Source #

min :: Citation a -> Citation a -> Citation a Source #

data ElementType a Source #

Constructors

EText TextType |
EDate Variable DateType (Maybe ShowDateParts) [DP] |
ENumber Variable NumberForm |
ENames [Variable] NamesFormat [Element a] |
ELabel Variable TermForm Pluralize |
EGroup Bool [Element a] |
EChoose [(Match, [Condition], [Element a])] |

#### Instances

Instances details

Show (ElementType a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> ElementType a -> ShowS Source # show :: ElementType a -> String Source # showList :: [ElementType a] -> ShowS Source #
Eq (ElementType a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: ElementType a -> ElementType a -> Bool Source # (/=) :: ElementType a -> ElementType a -> Bool Source #

data Element a Source #

Constructors

Element (ElementType a) Formatting |

#### Instances

Instances details

Show (Element a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Element a -> ShowS Source # show :: Element a -> String Source # showList :: [Element a] -> ShowS Source #
Eq (Element a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Element a -> Element a -> Bool Source # (/=) :: Element a -> Element a -> Bool Source #

data NumberForm Source #

Constructors

NumberNumeric |
NumberOrdinal |
NumberLongOrdinal |
NumberRoman |

#### Instances

Instances details

Show NumberForm Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> NumberForm -> ShowS Source # show :: NumberForm -> String Source # showList :: [NumberForm] -> ShowS Source #
Eq NumberForm Source # |
Instance details Defined in Citeproc.Types Methods (==) :: NumberForm -> NumberForm -> Bool Source # (/=) :: NumberForm -> NumberForm -> Bool Source #

data Pluralize Source #

Constructors

ContextualPluralize |
AlwaysPluralize |
NeverPluralize |

#### Instances

Instances details

Show Pluralize Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Pluralize -> ShowS Source # show :: Pluralize -> String Source # showList :: [Pluralize] -> ShowS Source #
Eq Pluralize Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Pluralize -> Pluralize -> Bool Source # (/=) :: Pluralize -> Pluralize -> Bool Source #

data DateType Source #

Constructors

LocalizedNumeric |
LocalizedText |
NonLocalized |

#### Instances

Instances details

Show DateType Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DateType -> ShowS Source # show :: DateType -> String Source # showList :: [DateType] -> ShowS Source #
Eq DateType Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DateType -> DateType -> Bool Source # (/=) :: DateType -> DateType -> Bool Source #
Ord DateType Source # |
Instance details Defined in Citeproc.Types Methods compare :: DateType -> DateType -> Ordering Source # (<) :: DateType -> DateType -> Bool Source # (<=) :: DateType -> DateType -> Bool Source # (>) :: DateType -> DateType -> Bool Source # (>=) :: DateType -> DateType -> Bool Source # max :: DateType -> DateType -> DateType Source # min :: DateType -> DateType -> DateType Source #

data Date Source #

Constructors

Date |

Fields

- dateParts :: [DateParts]
- dateCirca :: Bool
- dateSeason :: Maybe Int
- dateLiteral :: Maybe Text

#### Instances

Instances details

FromJSON Date Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser Date Source # parseJSONList :: Value -> Parser [Date] Source #
ToJSON Date Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Date -> Value Source # toEncoding :: Date -> Encoding Source # toJSONList :: [Date] -> Value Source # toEncodingList :: [Date] -> Encoding Source #
Show Date Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Date -> ShowS Source # show :: Date -> String Source # showList :: [Date] -> ShowS Source #
Eq Date Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Date -> Date -> Bool Source # (/=) :: Date -> Date -> Bool Source #
Ord Date Source # |
Instance details Defined in Citeproc.Types Methods compare :: Date -> Date -> Ordering Source # (<) :: Date -> Date -> Bool Source # (<=) :: Date -> Date -> Bool Source # (>) :: Date -> Date -> Bool Source # (>=) :: Date -> Date -> Bool Source # max :: Date -> Date -> Date Source # min :: Date -> Date -> Date Source #

rawDateEDTF :: Text -> Maybe Date Source #

newtype DateParts Source #

Constructors

DateParts [Int] |

#### Instances

Instances details

FromJSON DateParts Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser DateParts Source # parseJSONList :: Value -> Parser [DateParts] Source #
ToJSON DateParts Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: DateParts -> Value Source # toEncoding :: DateParts -> Encoding Source # toJSONList :: [DateParts] -> Value Source # toEncodingList :: [DateParts] -> Encoding Source #
Show DateParts Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DateParts -> ShowS Source # show :: DateParts -> String Source # showList :: [DateParts] -> ShowS Source #
Eq DateParts Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DateParts -> DateParts -> Bool Source # (/=) :: DateParts -> DateParts -> Bool Source #
Ord DateParts Source # |
Instance details Defined in Citeproc.Types Methods compare :: DateParts -> DateParts -> Ordering Source # (<) :: DateParts -> DateParts -> Bool Source # (<=) :: DateParts -> DateParts -> Bool Source # (>) :: DateParts -> DateParts -> Bool Source # (>=) :: DateParts -> DateParts -> Bool Source # max :: DateParts -> DateParts -> DateParts Source # min :: DateParts -> DateParts -> DateParts Source #

data ShowDateParts Source #

Constructors

YearMonthDay |
YearMonth |
Year |

#### Instances

Instances details

Show ShowDateParts Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> ShowDateParts -> ShowS Source # show :: ShowDateParts -> String Source # showList :: [ShowDateParts] -> ShowS Source #
Eq ShowDateParts Source # |
Instance details Defined in Citeproc.Types Methods (==) :: ShowDateParts -> ShowDateParts -> Bool Source # (/=) :: ShowDateParts -> ShowDateParts -> Bool Source #

data DPName Source #

Constructors

DPYear |
DPMonth |
DPDay |

#### Instances

Instances details

Show DPName Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DPName -> ShowS Source # show :: DPName -> String Source # showList :: [DPName] -> ShowS Source #
Eq DPName Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DPName -> DPName -> Bool Source # (/=) :: DPName -> DPName -> Bool Source #
Ord DPName Source # |
Instance details Defined in Citeproc.Types Methods compare :: DPName -> DPName -> Ordering Source # (<) :: DPName -> DPName -> Bool Source # (<=) :: DPName -> DPName -> Bool Source # (>) :: DPName -> DPName -> Bool Source # (>=) :: DPName -> DPName -> Bool Source # max :: DPName -> DPName -> DPName Source # min :: DPName -> DPName -> DPName Source #

data DPForm Source #

Constructors

DPNumeric |
DPNumericLeadingZeros |
DPOrdinal |
DPLong |
DPShort |

#### Instances

Instances details

Show DPForm Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DPForm -> ShowS Source # show :: DPForm -> String Source # showList :: [DPForm] -> ShowS Source #
Eq DPForm Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DPForm -> DPForm -> Bool Source # (/=) :: DPForm -> DPForm -> Bool Source #

data DP Source #

Constructors

DP |

Fields

- dpName :: DPName
- dpForm :: DPForm
- dpRangeDelimiter :: Text
- dpFormatting :: Formatting

#### Instances

Instances details

Show DP Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DP -> ShowS Source # show :: DP -> String Source # showList :: [DP] -> ShowS Source #
Eq DP Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DP -> DP -> Bool Source # (/=) :: DP -> DP -> Bool Source #

data VariableForm Source #

Constructors

ShortForm |
LongForm |

#### Instances

Instances details

Show VariableForm Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> VariableForm -> ShowS Source # show :: VariableForm -> String Source # showList :: [VariableForm] -> ShowS Source #
Eq VariableForm Source # |
Instance details Defined in Citeproc.Types Methods (==) :: VariableForm -> VariableForm -> Bool Source # (/=) :: VariableForm -> VariableForm -> Bool Source #

data TextType Source #

Constructors

TextVariable VariableForm Variable |
TextMacro Text |
TextTerm Term |
TextValue Text |

#### Instances

Instances details

Show TextType Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> TextType -> ShowS Source # show :: TextType -> String Source # showList :: [TextType] -> ShowS Source #
Eq TextType Source # |
Instance details Defined in Citeproc.Types Methods (==) :: TextType -> TextType -> Bool Source # (/=) :: TextType -> TextType -> Bool Source #

data NameFormat Source #

Constructors

NameFormat |

Fields

- nameGivenFormatting :: Maybe Formatting
- nameFamilyFormatting :: Maybe Formatting
- nameAndStyle :: Maybe TermForm
- nameDelimiter :: Text
- nameDelimiterPrecedesEtAl :: DelimiterPrecedes
- nameDelimiterPrecedesLast :: DelimiterPrecedes
- nameEtAlMin :: Maybe Int
- nameEtAlUseFirst :: Maybe Int
- nameEtAlSubsequentUseFirst :: Maybe Int
- nameEtAlSubsequentMin :: Maybe Int
- nameEtAlUseLast :: Bool
- nameForm :: NameForm
- nameInitialize :: Bool
- nameInitializeWith :: Maybe Text
- nameAsSortOrder :: Maybe NameAsSortOrder
- nameSortSeparator :: Text

#### Instances

Instances details

Show NameFormat Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> NameFormat -> ShowS Source # show :: NameFormat -> String Source # showList :: [NameFormat] -> ShowS Source #
Eq NameFormat Source # |
Instance details Defined in Citeproc.Types Methods (==) :: NameFormat -> NameFormat -> Bool Source # (/=) :: NameFormat -> NameFormat -> Bool Source #

defaultNameFormat :: NameFormat Source #

data NameAsSortOrder Source #

Constructors

NameAsSortOrderFirst |
NameAsSortOrderAll |

#### Instances

Instances details

Show NameAsSortOrder Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> NameAsSortOrder -> ShowS Source # show :: NameAsSortOrder -> String Source # showList :: [NameAsSortOrder] -> ShowS Source #
Eq NameAsSortOrder Source # |
Instance details Defined in Citeproc.Types Methods (==) :: NameAsSortOrder -> NameAsSortOrder -> Bool Source # (/=) :: NameAsSortOrder -> NameAsSortOrder -> Bool Source #

data NamesFormat Source #

Constructors

NamesFormat |

Fields

- namesLabel :: Maybe (TermForm, Pluralize, Formatting)
- namesEtAl :: Maybe (Text, Formatting)
- namesName :: Maybe (NameFormat, Formatting)
- namesLabelBeforeName :: Bool

#### Instances

Instances details

Show NamesFormat Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> NamesFormat -> ShowS Source # show :: NamesFormat -> String Source # showList :: [NamesFormat] -> ShowS Source #
Eq NamesFormat Source # |
Instance details Defined in Citeproc.Types Methods (==) :: NamesFormat -> NamesFormat -> Bool Source # (/=) :: NamesFormat -> NamesFormat -> Bool Source #

data NameForm Source #

Constructors

LongName |
ShortName |
CountName |

#### Instances

Instances details

Show NameForm Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> NameForm -> ShowS Source # show :: NameForm -> String Source # showList :: [NameForm] -> ShowS Source #
Eq NameForm Source # |
Instance details Defined in Citeproc.Types Methods (==) :: NameForm -> NameForm -> Bool Source # (/=) :: NameForm -> NameForm -> Bool Source #

data Name Source #

Constructors

Name |

Fields

- nameFamily :: Maybe Text
- nameGiven :: Maybe Text
- nameDroppingParticle :: Maybe Text
- nameNonDroppingParticle :: Maybe Text
- nameSuffix :: Maybe Text
- nameCommaSuffix :: Bool
- nameStaticOrdering :: Bool
- nameLiteral :: Maybe Text

#### Instances

Instances details

FromJSON Name Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser Name Source # parseJSONList :: Value -> Parser [Name] Source #
ToJSON Name Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Name -> Value Source # toEncoding :: Name -> Encoding Source # toJSONList :: [Name] -> Value Source # toEncodingList :: [Name] -> Encoding Source #
Show Name Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Name -> ShowS Source # show :: Name -> String Source # showList :: [Name] -> ShowS Source #
Eq Name Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Name -> Name -> Bool Source # (/=) :: Name -> Name -> Bool Source #
Ord Name Source # |
Instance details Defined in Citeproc.Types Methods compare :: Name -> Name -> Ordering Source # (<) :: Name -> Name -> Bool Source # (<=) :: Name -> Name -> Bool Source # (>) :: Name -> Name -> Bool Source # (>=) :: Name -> Name -> Bool Source # max :: Name -> Name -> Name Source # min :: Name -> Name -> Name Source #

extractParticles :: Name -> Name Source #

isByzantineName :: Name -> Bool Source #

data DelimiterPrecedes Source #

Constructors

PrecedesContextual |
PrecedesAfterInvertedName |
PrecedesAlways |
PrecedesNever |

#### Instances

Instances details

Show DelimiterPrecedes Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DelimiterPrecedes -> ShowS Source # show :: DelimiterPrecedes -> String Source # showList :: [DelimiterPrecedes] -> ShowS Source #
Eq DelimiterPrecedes Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DelimiterPrecedes -> DelimiterPrecedes -> Bool Source # (/=) :: DelimiterPrecedes -> DelimiterPrecedes -> Bool Source #

data Condition Source #

Constructors

HasVariable Variable |
HasType Text |
IsUncertainDate Variable |
IsNumeric Variable |
HasLocatorType Variable |
HasPosition Position |
WouldDisambiguate |

#### Instances

Instances details

Show Condition Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Condition -> ShowS Source # show :: Condition -> String Source # showList :: [Condition] -> ShowS Source #
Eq Condition Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Condition -> Condition -> Bool Source # (/=) :: Condition -> Condition -> Bool Source #

data Position Source #

Constructors

FirstPosition |
IbidWithLocator |
Ibid |
NearNote |
Subsequent |

#### Instances

Instances details

Show Position Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Position -> ShowS Source # show :: Position -> String Source # showList :: [Position] -> ShowS Source #
Eq Position Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Position -> Position -> Bool Source # (/=) :: Position -> Position -> Bool Source #
Ord Position Source # |
Instance details Defined in Citeproc.Types Methods compare :: Position -> Position -> Ordering Source # (<) :: Position -> Position -> Bool Source # (<=) :: Position -> Position -> Bool Source # (>) :: Position -> Position -> Bool Source # (>=) :: Position -> Position -> Bool Source # max :: Position -> Position -> Position Source # min :: Position -> Position -> Position Source #

data Match Source #

Constructors

MatchAll |
MatchAny |
MatchNone |

#### Instances

Instances details

Show Match Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Match -> ShowS Source # show :: Match -> String Source # showList :: [Match] -> ShowS Source #
Eq Match Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Match -> Match -> Bool Source # (/=) :: Match -> Match -> Bool Source #

data Formatting Source #

Constructors

Formatting |

Fields

- formatLang :: Maybe Lang
- formatFontStyle :: Maybe FontStyle
- formatFontVariant :: Maybe FontVariant
- formatFontWeight :: Maybe FontWeight
- formatTextDecoration :: Maybe TextDecoration
- formatVerticalAlign :: Maybe VerticalAlign
- formatPrefix :: Maybe Text
- formatSuffix :: Maybe Text
- formatDisplay :: Maybe DisplayStyle
- formatTextCase :: Maybe TextCase
- formatDelimiter :: Maybe Text
- formatStripPeriods :: Bool
- formatQuotes :: Bool
- formatAffixesInside :: Bool

#### Instances

Instances details

Monoid Formatting Source # |
Instance details Defined in Citeproc.Types Methods mempty :: Formatting Source # mappend :: Formatting -> Formatting -> Formatting Source # mconcat :: [Formatting] -> Formatting Source #
Semigroup Formatting Source # |
Instance details Defined in Citeproc.Types Methods (<>) :: Formatting -> Formatting -> Formatting Source # sconcat :: NonEmpty Formatting -> Formatting Source # stimes :: Integral b => b -> Formatting -> Formatting Source #
Show Formatting Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Formatting -> ShowS Source # show :: Formatting -> String Source # showList :: [Formatting] -> ShowS Source #
Eq Formatting Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Formatting -> Formatting -> Bool Source # (/=) :: Formatting -> Formatting -> Bool Source #

data FontStyle Source #

Constructors

NormalFont |
ItalicFont |
ObliqueFont |

#### Instances

Instances details

Show FontStyle Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> FontStyle -> ShowS Source # show :: FontStyle -> String Source # showList :: [FontStyle] -> ShowS Source #
Eq FontStyle Source # |
Instance details Defined in Citeproc.Types Methods (==) :: FontStyle -> FontStyle -> Bool Source # (/=) :: FontStyle -> FontStyle -> Bool Source #

data FontVariant Source #

Constructors

NormalVariant |
SmallCapsVariant |

#### Instances

Instances details

Show FontVariant Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> FontVariant -> ShowS Source # show :: FontVariant -> String Source # showList :: [FontVariant] -> ShowS Source #
Eq FontVariant Source # |
Instance details Defined in Citeproc.Types Methods (==) :: FontVariant -> FontVariant -> Bool Source # (/=) :: FontVariant -> FontVariant -> Bool Source #

data FontWeight Source #

Constructors

NormalWeight |
BoldWeight |
LightWeight |

#### Instances

Instances details

Show FontWeight Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> FontWeight -> ShowS Source # show :: FontWeight -> String Source # showList :: [FontWeight] -> ShowS Source #
Eq FontWeight Source # |
Instance details Defined in Citeproc.Types Methods (==) :: FontWeight -> FontWeight -> Bool Source # (/=) :: FontWeight -> FontWeight -> Bool Source #

data TextDecoration Source #

Constructors

NoDecoration |
UnderlineDecoration |

#### Instances

Instances details

Show TextDecoration Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> TextDecoration -> ShowS Source # show :: TextDecoration -> String Source # showList :: [TextDecoration] -> ShowS Source #
Eq TextDecoration Source # |
Instance details Defined in Citeproc.Types Methods (==) :: TextDecoration -> TextDecoration -> Bool Source # (/=) :: TextDecoration -> TextDecoration -> Bool Source #

data VerticalAlign Source #

Constructors

BaselineAlign |
SupAlign |
SubAlign |

#### Instances

Instances details

Show VerticalAlign Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> VerticalAlign -> ShowS Source # show :: VerticalAlign -> String Source # showList :: [VerticalAlign] -> ShowS Source #
Eq VerticalAlign Source # |
Instance details Defined in Citeproc.Types Methods (==) :: VerticalAlign -> VerticalAlign -> Bool Source # (/=) :: VerticalAlign -> VerticalAlign -> Bool Source #

data DisplayStyle Source #

Constructors

DisplayBlock |
DisplayLeftMargin |
DisplayRightInline |
DisplayIndent |

#### Instances

Instances details

Show DisplayStyle Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DisplayStyle -> ShowS Source # show :: DisplayStyle -> String Source # showList :: [DisplayStyle] -> ShowS Source #
Eq DisplayStyle Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DisplayStyle -> DisplayStyle -> Bool Source # (/=) :: DisplayStyle -> DisplayStyle -> Bool Source #

data TextCase Source #

Constructors

Lowercase |
Uppercase |
CapitalizeFirst |
CapitalizeAll |
SentenceCase |
TitleCase |

#### Instances

Instances details

Show TextCase Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> TextCase -> ShowS Source # show :: TextCase -> String Source # showList :: [TextCase] -> ShowS Source #
Eq TextCase Source # |
Instance details Defined in Citeproc.Types Methods (==) :: TextCase -> TextCase -> Bool Source # (/=) :: TextCase -> TextCase -> Bool Source #

data DemoteNonDroppingParticle Source #

Constructors

DemoteDisplayAndSort |
DemoteSortOnly |
DemoteNever |

#### Instances

Instances details

Show DemoteNonDroppingParticle Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DemoteNonDroppingParticle -> ShowS Source # show :: DemoteNonDroppingParticle -> String Source # showList :: [DemoteNonDroppingParticle] -> ShowS Source #
Eq DemoteNonDroppingParticle Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DemoteNonDroppingParticle -> DemoteNonDroppingParticle -> Bool Source # (/=) :: DemoteNonDroppingParticle -> DemoteNonDroppingParticle -> Bool Source #

data StyleOptions Source #

Constructors

StyleOptions |

Fields

- styleIsNoteStyle :: Bool
- styleDefaultLocale :: Maybe Lang
- styleDemoteNonDroppingParticle :: DemoteNonDroppingParticle
- styleInitializeWithHyphen :: Bool
- stylePageRangeFormat :: Maybe PageRangeFormat
- stylePageRangeDelimiter :: Maybe Text
- styleDisambiguation :: DisambiguationStrategy
- styleNearNoteDistance :: Maybe Int
- styleCiteGroupDelimiter :: Maybe Text
- styleLineSpacing :: Maybe Int
- styleEntrySpacing :: Maybe Int
- styleHangingIndent :: Bool
- styleSecondFieldAlign :: Maybe SecondFieldAlign
- styleSubsequentAuthorSubstitute :: Maybe SubsequentAuthorSubstitute
- styleUsesYearSuffixVariable :: Bool

#### Instances

Instances details

Show StyleOptions Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> StyleOptions -> ShowS Source # show :: StyleOptions -> String Source # showList :: [StyleOptions] -> ShowS Source #
Eq StyleOptions Source # |
Instance details Defined in Citeproc.Types Methods (==) :: StyleOptions -> StyleOptions -> Bool Source # (/=) :: StyleOptions -> StyleOptions -> Bool Source #

data SubsequentAuthorSubstitute Source #

Constructors

SubsequentAuthorSubstitute Text SubsequentAuthorSubstituteRule |

#### Instances

Instances details

Show SubsequentAuthorSubstitute Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> SubsequentAuthorSubstitute -> ShowS Source # show :: SubsequentAuthorSubstitute -> String Source # showList :: [SubsequentAuthorSubstitute] -> ShowS Source #
Eq SubsequentAuthorSubstitute Source # |
Instance details Defined in Citeproc.Types Methods (==) :: SubsequentAuthorSubstitute -> SubsequentAuthorSubstitute -> Bool Source # (/=) :: SubsequentAuthorSubstitute -> SubsequentAuthorSubstitute -> Bool Source #

data SubsequentAuthorSubstituteRule Source #

Constructors

CompleteAll |
CompleteEach |
PartialEach |
PartialFirst |

#### Instances

Instances details

Show SubsequentAuthorSubstituteRule Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> SubsequentAuthorSubstituteRule -> ShowS Source # show :: SubsequentAuthorSubstituteRule -> String Source # showList :: [SubsequentAuthorSubstituteRule] -> ShowS Source #
Eq SubsequentAuthorSubstituteRule Source # |
Instance details Defined in Citeproc.Types Methods (==) :: SubsequentAuthorSubstituteRule -> SubsequentAuthorSubstituteRule -> Bool Source # (/=) :: SubsequentAuthorSubstituteRule -> SubsequentAuthorSubstituteRule -> Bool Source #

data SecondFieldAlign Source #

Constructors

SecondFieldAlignFlush |
SecondFieldAlignMargin |

#### Instances

Instances details

Show SecondFieldAlign Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> SecondFieldAlign -> ShowS Source # show :: SecondFieldAlign -> String Source # showList :: [SecondFieldAlign] -> ShowS Source #
Eq SecondFieldAlign Source # |
Instance details Defined in Citeproc.Types Methods (==) :: SecondFieldAlign -> SecondFieldAlign -> Bool Source # (/=) :: SecondFieldAlign -> SecondFieldAlign -> Bool Source #

data PageRangeFormat Source #

Constructors

PageRangeChicago15 |
PageRangeChicago16 |
PageRangeExpanded |
PageRangeMinimal |
PageRangeMinimalTwo |

#### Instances

Instances details

Show PageRangeFormat Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> PageRangeFormat -> ShowS Source # show :: PageRangeFormat -> String Source # showList :: [PageRangeFormat] -> ShowS Source #
Eq PageRangeFormat Source # |
Instance details Defined in Citeproc.Types Methods (==) :: PageRangeFormat -> PageRangeFormat -> Bool Source # (/=) :: PageRangeFormat -> PageRangeFormat -> Bool Source #
Ord PageRangeFormat Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: PageRangeFormat -> PageRangeFormat -> Ordering Source #

(<) :: PageRangeFormat -> PageRangeFormat -> Bool Source #

(<=) :: PageRangeFormat -> PageRangeFormat -> Bool Source #

(>) :: PageRangeFormat -> PageRangeFormat -> Bool Source #

(>=) :: PageRangeFormat -> PageRangeFormat -> Bool Source #

max :: PageRangeFormat -> PageRangeFormat -> PageRangeFormat Source #

min :: PageRangeFormat -> PageRangeFormat -> PageRangeFormat Source #

data Style a Source #

Constructors

Style |

Fields

- styleCslVersion :: (Int, Int, Int)
- styleOptions :: StyleOptions
- styleCitation :: Layout a
- styleBibliography :: Maybe (Layout a)
- styleLocales :: [Locale]
- styleAbbreviations :: Maybe Abbreviations

#### Instances

Instances details

Show (Style a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Style a -> ShowS Source # show :: Style a -> String Source # showList :: [Style a] -> ShowS Source #
Eq (Style a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Style a -> Style a -> Bool Source # (/=) :: Style a -> Style a -> Bool Source #

data TermMatch Source #

Constructors

LastDigit |
LastTwoDigits |
WholeNumber |

#### Instances

Instances details

Show TermMatch Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> TermMatch -> ShowS Source # show :: TermMatch -> String Source # showList :: [TermMatch] -> ShowS Source #
Eq TermMatch Source # |
Instance details Defined in Citeproc.Types Methods (==) :: TermMatch -> TermMatch -> Bool Source # (/=) :: TermMatch -> TermMatch -> Bool Source #
Ord TermMatch Source # |
Instance details Defined in Citeproc.Types Methods compare :: TermMatch -> TermMatch -> Ordering Source # (<) :: TermMatch -> TermMatch -> Bool Source # (<=) :: TermMatch -> TermMatch -> Bool Source # (>) :: TermMatch -> TermMatch -> Bool Source # (>=) :: TermMatch -> TermMatch -> Bool Source # max :: TermMatch -> TermMatch -> TermMatch Source # min :: TermMatch -> TermMatch -> TermMatch Source #

data TermGender Source #

Constructors

Masculine |
Feminine |

#### Instances

Instances details

Show TermGender Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> TermGender -> ShowS Source # show :: TermGender -> String Source # showList :: [TermGender] -> ShowS Source #
Eq TermGender Source # |
Instance details Defined in Citeproc.Types Methods (==) :: TermGender -> TermGender -> Bool Source # (/=) :: TermGender -> TermGender -> Bool Source #
Ord TermGender Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: TermGender -> TermGender -> Ordering Source #

(<) :: TermGender -> TermGender -> Bool Source #

(<=) :: TermGender -> TermGender -> Bool Source #

(>) :: TermGender -> TermGender -> Bool Source #

(>=) :: TermGender -> TermGender -> Bool Source #

max :: TermGender -> TermGender -> TermGender Source #

min :: TermGender -> TermGender -> TermGender Source #

data TermNumber Source #

Constructors

Singular |
Plural |

#### Instances

Instances details

Show TermNumber Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> TermNumber -> ShowS Source # show :: TermNumber -> String Source # showList :: [TermNumber] -> ShowS Source #
Eq TermNumber Source # |
Instance details Defined in Citeproc.Types Methods (==) :: TermNumber -> TermNumber -> Bool Source # (/=) :: TermNumber -> TermNumber -> Bool Source #
Ord TermNumber Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: TermNumber -> TermNumber -> Ordering Source #

(<) :: TermNumber -> TermNumber -> Bool Source #

(<=) :: TermNumber -> TermNumber -> Bool Source #

(>) :: TermNumber -> TermNumber -> Bool Source #

(>=) :: TermNumber -> TermNumber -> Bool Source #

max :: TermNumber -> TermNumber -> TermNumber Source #

min :: TermNumber -> TermNumber -> TermNumber Source #

data TermForm Source #

Constructors

Long |
Short |
Verb |
VerbShort |
Symbol |

#### Instances

Instances details

Show TermForm Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> TermForm -> ShowS Source # show :: TermForm -> String Source # showList :: [TermForm] -> ShowS Source #
Eq TermForm Source # |
Instance details Defined in Citeproc.Types Methods (==) :: TermForm -> TermForm -> Bool Source # (/=) :: TermForm -> TermForm -> Bool Source #
Ord TermForm Source # |
Instance details Defined in Citeproc.Types Methods compare :: TermForm -> TermForm -> Ordering Source # (<) :: TermForm -> TermForm -> Bool Source # (<=) :: TermForm -> TermForm -> Bool Source # (>) :: TermForm -> TermForm -> Bool Source # (>=) :: TermForm -> TermForm -> Bool Source # max :: TermForm -> TermForm -> TermForm Source # min :: TermForm -> TermForm -> TermForm Source #

data Term Source #

Constructors

Term |

Fields

- termName :: Text
- termForm :: TermForm
- termNumber :: Maybe TermNumber
- termGender :: Maybe TermGender
- termGenderForm :: Maybe TermGender
- termMatch :: Maybe TermMatch

#### Instances

Instances details

Show Term Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Term -> ShowS Source # show :: Term -> String Source # showList :: [Term] -> ShowS Source #
Eq Term Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Term -> Term -> Bool Source # (/=) :: Term -> Term -> Bool Source #
Ord Term Source # |
Instance details Defined in Citeproc.Types Methods compare :: Term -> Term -> Ordering Source # (<) :: Term -> Term -> Bool Source # (<=) :: Term -> Term -> Bool Source # (>) :: Term -> Term -> Bool Source # (>=) :: Term -> Term -> Bool Source # max :: Term -> Term -> Term Source # min :: Term -> Term -> Term Source #

emptyTerm :: Term Source #

data SortDirection Source #

Constructors

Ascending |
Descending |

#### Instances

Instances details

Show SortDirection Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> SortDirection -> ShowS Source # show :: SortDirection -> String Source # showList :: [SortDirection] -> ShowS Source #
Eq SortDirection Source # |
Instance details Defined in Citeproc.Types Methods (==) :: SortDirection -> SortDirection -> Bool Source # (/=) :: SortDirection -> SortDirection -> Bool Source #

data SortKey a Source #

Constructors

SortKeyVariable SortDirection Variable |
SortKeyMacro SortDirection [Element a] |

#### Instances

Instances details

Show (SortKey a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> SortKey a -> ShowS Source # show :: SortKey a -> String Source # showList :: [SortKey a] -> ShowS Source #
Eq (SortKey a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: SortKey a -> SortKey a -> Bool Source # (/=) :: SortKey a -> SortKey a -> Bool Source #

data SortKeyValue Source #

Constructors

SortKeyValue SortDirection (Maybe [Text]) |

#### Instances

Instances details

Show SortKeyValue Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> SortKeyValue -> ShowS Source # show :: SortKeyValue -> String Source # showList :: [SortKeyValue] -> ShowS Source #
Eq SortKeyValue Source # |
Instance details Defined in Citeproc.Types Methods (==) :: SortKeyValue -> SortKeyValue -> Bool Source # (/=) :: SortKeyValue -> SortKeyValue -> Bool Source #

data LayoutOptions Source #

Constructors

LayoutOptions |

Fields

- layoutCollapse :: Maybe Collapsing
- layoutYearSuffixDelimiter :: Maybe Text
- layoutAfterCollapseDelimiter :: Maybe Text

#### Instances

Instances details

Show LayoutOptions Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> LayoutOptions -> ShowS Source # show :: LayoutOptions -> String Source # showList :: [LayoutOptions] -> ShowS Source #
Eq LayoutOptions Source # |
Instance details Defined in Citeproc.Types Methods (==) :: LayoutOptions -> LayoutOptions -> Bool Source # (/=) :: LayoutOptions -> LayoutOptions -> Bool Source #

data Collapsing Source #

Constructors

CollapseCitationNumber |
CollapseYear |
CollapseYearSuffix |
CollapseYearSuffixRanged |

#### Instances

Instances details

Show Collapsing Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Collapsing -> ShowS Source # show :: Collapsing -> String Source # showList :: [Collapsing] -> ShowS Source #
Eq Collapsing Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Collapsing -> Collapsing -> Bool Source # (/=) :: Collapsing -> Collapsing -> Bool Source #

data Layout a Source #

Constructors

Layout |

Fields

- layoutOptions :: LayoutOptions
- layoutFormatting :: Formatting
- layoutElements :: [Element a]
- layoutSortKeys :: [SortKey a]

#### Instances

Instances details

Show (Layout a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Layout a -> ShowS Source # show :: Layout a -> String Source # showList :: [Layout a] -> ShowS Source #
Eq (Layout a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Layout a -> Layout a -> Bool Source # (/=) :: Layout a -> Layout a -> Bool Source #

data DisambiguationStrategy Source #

Constructors

DisambiguationStrategy |

Fields

- disambiguateAddNames :: Bool
- disambiguateAddGivenNames :: Maybe GivenNameDisambiguationRule
- disambiguateAddYearSuffix :: Bool

#### Instances

Instances details

Show DisambiguationStrategy Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DisambiguationStrategy -> ShowS Source # show :: DisambiguationStrategy -> String Source # showList :: [DisambiguationStrategy] -> ShowS Source #
Eq DisambiguationStrategy Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DisambiguationStrategy -> DisambiguationStrategy -> Bool Source # (/=) :: DisambiguationStrategy -> DisambiguationStrategy -> Bool Source #
Ord DisambiguationStrategy Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: DisambiguationStrategy -> DisambiguationStrategy -> Ordering Source #

(<) :: DisambiguationStrategy -> DisambiguationStrategy -> Bool Source #

(<=) :: DisambiguationStrategy -> DisambiguationStrategy -> Bool Source #

(>) :: DisambiguationStrategy -> DisambiguationStrategy -> Bool Source #

(>=) :: DisambiguationStrategy -> DisambiguationStrategy -> Bool Source #

max :: DisambiguationStrategy -> DisambiguationStrategy -> DisambiguationStrategy Source #

min :: DisambiguationStrategy -> DisambiguationStrategy -> DisambiguationStrategy Source #

data GivenNameDisambiguationRule Source #

Constructors

AllNames |
AllNamesWithInitials |
PrimaryName |
PrimaryNameWithInitials |
ByCite |

#### Instances

Instances details

Show GivenNameDisambiguationRule Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> GivenNameDisambiguationRule -> ShowS Source # show :: GivenNameDisambiguationRule -> String Source # showList :: [GivenNameDisambiguationRule] -> ShowS Source #
Eq GivenNameDisambiguationRule Source # |
Instance details Defined in Citeproc.Types Methods (==) :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> Bool Source # (/=) :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> Bool Source #
Ord GivenNameDisambiguationRule Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> Ordering Source #

(<) :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> Bool Source #

(<=) :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> Bool Source #

(>) :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> Bool Source #

(>=) :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> Bool Source #

max :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> GivenNameDisambiguationRule Source #

min :: GivenNameDisambiguationRule -> GivenNameDisambiguationRule -> GivenNameDisambiguationRule Source #

data Lang Source #

Represents a BCP 47 language tag (https://tools.ietf.org/html/bcp47).

Constructors

Lang |

Fields

- langLanguage :: Text
- langScript :: Maybe Text
- langRegion :: Maybe Text
- langVariants :: [Text]
- langExtensions :: [(Text, [(Text, Text)])]
- langPrivateUse :: [Text]

#### Instances

Instances details

IsString Lang |
Instance details Defined in Text.Collate.Lang Methods fromString :: String -> Lang Source #
Show Lang |
Instance details Defined in Text.Collate.Lang Methods showsPrec :: Int -> Lang -> ShowS Source # show :: Lang -> String Source # showList :: [Lang] -> ShowS Source #
Binary Lang |
Instance details Defined in Text.Collate.Lang Methods put :: Lang -> Put Source # get :: Get Lang Source # putList :: [Lang] -> Put Source #
Eq Lang |
Instance details Defined in Text.Collate.Lang Methods (==) :: Lang -> Lang -> Bool Source # (/=) :: Lang -> Lang -> Bool Source #
Ord Lang |
Instance details Defined in Text.Collate.Lang Methods compare :: Lang -> Lang -> Ordering Source # (<) :: Lang -> Lang -> Bool Source # (<=) :: Lang -> Lang -> Bool Source # (>) :: Lang -> Lang -> Bool Source # (>=) :: Lang -> Lang -> Bool Source # max :: Lang -> Lang -> Lang Source # min :: Lang -> Lang -> Lang Source #
Lift Lang |
Instance details Defined in Text.Collate.Lang Methods lift :: Quote m => Lang -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Lang -> Code m Lang Source #

parseLang :: Text -> Either String Lang Source #

Parse a BCP 47 language tag as a `Lang`.

renderLang :: Lang -> Text Source #

Render a `Lang` in BCP 47 form.

data Locale Source #

Defines locale-specific terms, punctuation styles, and date formats.

Constructors

Locale |

Fields

- localeLanguage :: Maybe Lang
- localePunctuationInQuote :: Maybe Bool
- localeLimitDayOrdinalsToDay1 :: Maybe Bool
- localeDate :: Map DateType (Element Text)
- localeTerms :: Map Text [(Term, Text)]

#### Instances

Instances details

Monoid Locale Source # |
Instance details Defined in Citeproc.Types Methods mempty :: Locale Source # mappend :: Locale -> Locale -> Locale Source # mconcat :: [Locale] -> Locale Source #
Semigroup Locale Source # |
Instance details Defined in Citeproc.Types Methods (<>) :: Locale -> Locale -> Locale Source # sconcat :: NonEmpty Locale -> Locale Source # stimes :: Integral b => b -> Locale -> Locale Source #
Show Locale Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Locale -> ShowS Source # show :: Locale -> String Source # showList :: [Locale] -> ShowS Source #
Eq Locale Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Locale -> Locale -> Bool Source # (/=) :: Locale -> Locale -> Bool Source #

data DisambiguationData Source #

Constructors

DisambiguationData |

Fields

- disambYearSuffix :: Maybe Int
- disambNameMap :: Map Name NameHints
- disambEtAlNames :: Maybe Int
- disambCondition :: Bool

#### Instances

Instances details

Show DisambiguationData Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> DisambiguationData -> ShowS Source # show :: DisambiguationData -> String Source # showList :: [DisambiguationData] -> ShowS Source #
Eq DisambiguationData Source # |
Instance details Defined in Citeproc.Types Methods (==) :: DisambiguationData -> DisambiguationData -> Bool Source # (/=) :: DisambiguationData -> DisambiguationData -> Bool Source #
Ord DisambiguationData Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: DisambiguationData -> DisambiguationData -> Ordering Source #

(<) :: DisambiguationData -> DisambiguationData -> Bool Source #

(<=) :: DisambiguationData -> DisambiguationData -> Bool Source #

(>) :: DisambiguationData -> DisambiguationData -> Bool Source #

(>=) :: DisambiguationData -> DisambiguationData -> Bool Source #

max :: DisambiguationData -> DisambiguationData -> DisambiguationData Source #

min :: DisambiguationData -> DisambiguationData -> DisambiguationData Source #

data NameHints Source #

Constructors

AddInitials |
AddGivenName |
AddInitialsIfPrimary |
AddGivenNameIfPrimary |

#### Instances

Instances details

Show NameHints Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> NameHints -> ShowS Source # show :: NameHints -> String Source # showList :: [NameHints] -> ShowS Source #
Eq NameHints Source # |
Instance details Defined in Citeproc.Types Methods (==) :: NameHints -> NameHints -> Bool Source # (/=) :: NameHints -> NameHints -> Bool Source #
Ord NameHints Source # |
Instance details Defined in Citeproc.Types Methods compare :: NameHints -> NameHints -> Ordering Source # (<) :: NameHints -> NameHints -> Bool Source # (<=) :: NameHints -> NameHints -> Bool Source # (>) :: NameHints -> NameHints -> Bool Source # (>=) :: NameHints -> NameHints -> Bool Source # max :: NameHints -> NameHints -> NameHints Source # min :: NameHints -> NameHints -> NameHints Source #

data Reference a Source #

Encodes bibliographic data for a single work.

Constructors

Reference |

Fields

- referenceId :: ItemId
- referenceType :: Text
- referenceDisambiguation :: Maybe DisambiguationData

  This is added in processing; if you are constructing a Reference, set to Nothing

- referenceVariables :: Map Variable (Val a)

#### Instances

Instances details

Foldable Reference Source # |

Instance details

Defined in Citeproc.Types

Methods

fold :: Monoid m => Reference m -> m Source #

foldMap :: Monoid m => (a -> m) -> Reference a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Reference a -> m Source #

foldr :: (a -> b -> b) -> b -> Reference a -> b Source #

foldr' :: (a -> b -> b) -> b -> Reference a -> b Source #

foldl :: (b -> a -> b) -> b -> Reference a -> b Source #

foldl' :: (b -> a -> b) -> b -> Reference a -> b Source #

foldr1 :: (a -> a -> a) -> Reference a -> a Source #

foldl1 :: (a -> a -> a) -> Reference a -> a Source #

toList :: Reference a -> [a] Source #

null :: Reference a -> Bool Source #

length :: Reference a -> Int Source #

elem :: Eq a => a -> Reference a -> Bool Source #

maximum :: Ord a => Reference a -> a Source #

minimum :: Ord a => Reference a -> a Source #

sum :: Num a => Reference a -> a Source #

product :: Num a => Reference a -> a Source #

Traversable Reference Source # |
Instance details Defined in Citeproc.Types Methods traverse :: Applicative f => (a -> f b) -> Reference a -> f (Reference b) Source # sequenceA :: Applicative f => Reference (f a) -> f (Reference a) Source # mapM :: Monad m => (a -> m b) -> Reference a -> m (Reference b) Source # sequence :: Monad m => Reference (m a) -> m (Reference a) Source #
Functor Reference Source # |
Instance details Defined in Citeproc.Types Methods fmap :: (a -> b) -> Reference a -> Reference b Source # (<$) :: a -> Reference b -> Reference a Source #
(Eq a, FromJSON a) => FromJSON (Reference a) Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (Reference a) Source # parseJSONList :: Value -> Parser [Reference a] Source #
ToJSON a => ToJSON (Reference a) Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Reference a -> Value Source # toEncoding :: Reference a -> Encoding Source # toJSONList :: [Reference a] -> Value Source # toEncodingList :: [Reference a] -> Encoding Source #
Show a => Show (Reference a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Reference a -> ShowS Source # show :: Reference a -> String Source # showList :: [Reference a] -> ShowS Source #
Eq a => Eq (Reference a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Reference a -> Reference a -> Bool Source # (/=) :: Reference a -> Reference a -> Bool Source #
Ord a => Ord (Reference a) Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: Reference a -> Reference a -> Ordering Source #

(<) :: Reference a -> Reference a -> Bool Source #

(<=) :: Reference a -> Reference a -> Bool Source #

(>) :: Reference a -> Reference a -> Bool Source #

(>=) :: Reference a -> Reference a -> Bool Source #

max :: Reference a -> Reference a -> Reference a Source #

min :: Reference a -> Reference a -> Reference a Source #

newtype ReferenceMap a Source #

Constructors

ReferenceMap |

Fields

- unReferenceMap :: Map ItemId (Reference a)

#### Instances

Instances details

Show a => Show (ReferenceMap a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> ReferenceMap a -> ShowS Source # show :: ReferenceMap a -> String Source # showList :: [ReferenceMap a] -> ShowS Source #

makeReferenceMap :: [Reference a] -> ([Reference a], ReferenceMap a) Source #

Returns a pair consisting of the cleaned up list of references and a reference map. If the original reference list contains items with the same id, then the one that occurs last in the list is retained, and the others are omittedfrom the cleaned-up list.

lookupReference :: ItemId -> ReferenceMap a -> Maybe (Reference a) Source #

data Val a Source #

Value associated with a certain variable in a bibliographic entry.

Constructors

TextVal Text | Plain text value
FancyVal a | Formatted value with parameterized type
NumVal Int | Numerical value
NamesVal [Name] | Structured names
DateVal Date | Structured date
SubstitutedVal | Value suppressed through substitution

#### Instances

Instances details

Foldable Val Source # |

Instance details

Defined in Citeproc.Types

Methods

fold :: Monoid m => Val m -> m Source #

foldMap :: Monoid m => (a -> m) -> Val a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Val a -> m Source #

foldr :: (a -> b -> b) -> b -> Val a -> b Source #

foldr' :: (a -> b -> b) -> b -> Val a -> b Source #

foldl :: (b -> a -> b) -> b -> Val a -> b Source #

foldl' :: (b -> a -> b) -> b -> Val a -> b Source #

foldr1 :: (a -> a -> a) -> Val a -> a Source #

foldl1 :: (a -> a -> a) -> Val a -> a Source #

toList :: Val a -> [a] Source #

null :: Val a -> Bool Source #

length :: Val a -> Int Source #

elem :: Eq a => a -> Val a -> Bool Source #

maximum :: Ord a => Val a -> a Source #

minimum :: Ord a => Val a -> a Source #

sum :: Num a => Val a -> a Source #

product :: Num a => Val a -> a Source #

Traversable Val Source # |
Instance details Defined in Citeproc.Types Methods traverse :: Applicative f => (a -> f b) -> Val a -> f (Val b) Source # sequenceA :: Applicative f => Val (f a) -> f (Val a) Source # mapM :: Monad m => (a -> m b) -> Val a -> m (Val b) Source # sequence :: Monad m => Val (m a) -> m (Val a) Source #
Functor Val Source # |
Instance details Defined in Citeproc.Types Methods fmap :: (a -> b) -> Val a -> Val b Source # (<$) :: a -> Val b -> Val a Source #
ToJSON a => ToJSON (Val a) Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Val a -> Value Source # toEncoding :: Val a -> Encoding Source # toJSONList :: [Val a] -> Value Source # toEncodingList :: [Val a] -> Encoding Source #
Show a => Show (Val a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Val a -> ShowS Source # show :: Val a -> String Source # showList :: [Val a] -> ShowS Source #
Eq a => Eq (Val a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Val a -> Val a -> Bool Source # (/=) :: Val a -> Val a -> Bool Source #
Ord a => Ord (Val a) Source # |
Instance details Defined in Citeproc.Types Methods compare :: Val a -> Val a -> Ordering Source # (<) :: Val a -> Val a -> Bool Source # (<=) :: Val a -> Val a -> Bool Source # (>) :: Val a -> Val a -> Bool Source # (>=) :: Val a -> Val a -> Bool Source # max :: Val a -> Val a -> Val a Source # min :: Val a -> Val a -> Val a Source #

valToText :: CiteprocOutput a => Val a -> Maybe Text Source #

data Variable Source #

#### Instances

Instances details

FromJSON Variable Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser Variable Source # parseJSONList :: Value -> Parser [Variable] Source #
FromJSONKey Variable Source # |
Instance details Defined in Citeproc.Types Methods fromJSONKey :: FromJSONKeyFunction Variable Source # fromJSONKeyList :: FromJSONKeyFunction [Variable] Source #
ToJSON Variable Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Variable -> Value Source # toEncoding :: Variable -> Encoding Source # toJSONList :: [Variable] -> Value Source # toEncodingList :: [Variable] -> Encoding Source #
ToJSONKey Variable Source # |
Instance details Defined in Citeproc.Types Methods toJSONKey :: ToJSONKeyFunction Variable Source # toJSONKeyList :: ToJSONKeyFunction [Variable] Source #
IsString Variable Source # |
Instance details Defined in Citeproc.Types Methods fromString :: String -> Variable Source #
Monoid Variable Source # |
Instance details Defined in Citeproc.Types Methods mempty :: Variable Source # mappend :: Variable -> Variable -> Variable Source # mconcat :: [Variable] -> Variable Source #
Semigroup Variable Source # |
Instance details Defined in Citeproc.Types Methods (<>) :: Variable -> Variable -> Variable Source # sconcat :: NonEmpty Variable -> Variable Source # stimes :: Integral b => b -> Variable -> Variable Source #
Show Variable Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Variable -> ShowS Source # show :: Variable -> String Source # showList :: [Variable] -> ShowS Source #
Eq Variable Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Variable -> Variable -> Bool Source # (/=) :: Variable -> Variable -> Bool Source #
Ord Variable Source # |
Instance details Defined in Citeproc.Types Methods compare :: Variable -> Variable -> Ordering Source # (<) :: Variable -> Variable -> Bool Source # (<=) :: Variable -> Variable -> Bool Source # (>) :: Variable -> Variable -> Bool Source # (>=) :: Variable -> Variable -> Bool Source # max :: Variable -> Variable -> Variable Source # min :: Variable -> Variable -> Variable Source #

toVariable :: Text -> Variable Source #

fromVariable :: Variable -> Text Source #

lookupVariable :: CiteprocOutput a => Variable -> Reference a -> Maybe (Val a) Source #

data Output a Source #

Constructors

Formatted Formatting [Output a] |
Linked Text [Output a] |
InNote (Output a) |
Literal a |
Tagged Tag (Output a) |
NullOutput |

#### Instances

Instances details

Show a => Show (Output a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Output a -> ShowS Source # show :: Output a -> String Source # showList :: [Output a] -> ShowS Source #
Eq a => Eq (Output a) Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Output a -> Output a -> Bool Source # (/=) :: Output a -> Output a -> Bool Source #
Uniplate (Output a) Source # |
Instance details Defined in Citeproc.Types Methods uniplate :: Output a -> (Str (Output a), Str (Output a) -> Output a) Source # descend :: (Output a -> Output a) -> Output a -> Output a Source # descendM :: Applicative m => (Output a -> m (Output a)) -> Output a -> m (Output a) Source #
Biplate (Output a) (Output a) Source # |
Instance details Defined in Citeproc.Types Methods biplate :: Output a -> (Str (Output a), Str (Output a) -> Output a) Source # descendBi :: (Output a -> Output a) -> Output a -> Output a Source # descendBiM :: Applicative m => (Output a -> m (Output a)) -> Output a -> m (Output a) Source #

data Identifier Source #

Constructors

IdentDOI Text |
IdentPMCID Text |
IdentPMID Text |
IdentURL Text |

#### Instances

Instances details

Show Identifier Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Identifier -> ShowS Source # show :: Identifier -> String Source # showList :: [Identifier] -> ShowS Source #
Eq Identifier Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Identifier -> Identifier -> Bool Source # (/=) :: Identifier -> Identifier -> Bool Source #

identifierToURL :: Identifier -> Text Source #

fixShortDOI :: Text -> Text Source #

Deprecated: This function is no longer used and will be removed.

data Tag Source #

Constructors

TagTerm Term |
TagCitationNumber Int |
TagCitationLabel |
TagTitle | marks the title of an entry, so it can be hyperlinked later
TagItem CitationItemType ItemId |
TagName Name |
TagNames Variable NamesFormat [Name] |
TagDate Date |
TagYearSuffix Int |
TagLocator |
TagPrefix |
TagSuffix |

#### Instances

Instances details

Show Tag Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Tag -> ShowS Source # show :: Tag -> String Source # showList :: [Tag] -> ShowS Source #
Eq Tag Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Tag -> Tag -> Bool Source # (/=) :: Tag -> Tag -> Bool Source #

outputToText :: CiteprocOutput a => Output a -> Text Source #

renderOutput :: CiteprocOutput a => CiteprocOptions -> Output a -> a Source #

grouped :: [Output a] -> Output a Source #

formatted :: Formatting -> [Output a] -> Output a Source #

readAsInt :: Text -> Maybe Int Source #

variableType :: Variable -> VariableType Source #

data VariableType Source #

Constructors

DateVariable |
NameVariable |
NumberVariable |
StringVariable |
UnknownVariable |

#### Instances

Instances details

Show VariableType Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> VariableType -> ShowS Source # show :: VariableType -> String Source # showList :: [VariableType] -> ShowS Source #
Eq VariableType Source # |
Instance details Defined in Citeproc.Types Methods (==) :: VariableType -> VariableType -> Bool Source # (/=) :: VariableType -> VariableType -> Bool Source #

data Abbreviations Source #

An abbreviations map. These are typically stored in a JSON serialization: for examples of the format, see https://github.com/citation-style-language/abbreviations. Abbreviations are substituted in the output when the variable and its content are matched by something in the abbreviations map.

#### Instances

Instances details

FromJSON Abbreviations Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser Abbreviations Source # parseJSONList :: Value -> Parser [Abbreviations] Source #
ToJSON Abbreviations Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Abbreviations -> Value Source # toEncoding :: Abbreviations -> Encoding Source # toJSONList :: [Abbreviations] -> Value Source # toEncodingList :: [Abbreviations] -> Encoding Source #
Show Abbreviations Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Abbreviations -> ShowS Source # show :: Abbreviations -> String Source # showList :: [Abbreviations] -> ShowS Source #
Eq Abbreviations Source # |
Instance details Defined in Citeproc.Types Methods (==) :: Abbreviations -> Abbreviations -> Bool Source # (/=) :: Abbreviations -> Abbreviations -> Bool Source #
Ord Abbreviations Source # |

Instance details

Defined in Citeproc.Types

Methods

compare :: Abbreviations -> Abbreviations -> Ordering Source #

(<) :: Abbreviations -> Abbreviations -> Bool Source #

(<=) :: Abbreviations -> Abbreviations -> Bool Source #

(>) :: Abbreviations -> Abbreviations -> Bool Source #

(>=) :: Abbreviations -> Abbreviations -> Bool Source #

max :: Abbreviations -> Abbreviations -> Abbreviations Source #

min :: Abbreviations -> Abbreviations -> Abbreviations Source #

lookupAbbreviation :: CiteprocOutput a => Variable -> Val a -> Abbreviations -> Maybe (Val a) Source #

Returns an abbreviation if the variable and its value match something in the abbreviations map.

data Result a Source #

Result of citation processing.

Constructors

Result |

Fields

- resultCitations :: [a]

  List of formatted citations corresponding to the citations given to `citeproc`

- resultBibliography :: [(Text, a)]

  List of formatted bibliography entries (if the style calls for a bibliography), each a pair consisting of the item identifier and the formatted entry

- resultWarnings :: [Text]

  Warnings from citation processing

#### Instances

Instances details

Foldable Result Source # |

Instance details

Defined in Citeproc.Types

Methods

fold :: Monoid m => Result m -> m Source #

foldMap :: Monoid m => (a -> m) -> Result a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Result a -> m Source #

foldr :: (a -> b -> b) -> b -> Result a -> b Source #

foldr' :: (a -> b -> b) -> b -> Result a -> b Source #

foldl :: (b -> a -> b) -> b -> Result a -> b Source #

foldl' :: (b -> a -> b) -> b -> Result a -> b Source #

foldr1 :: (a -> a -> a) -> Result a -> a Source #

foldl1 :: (a -> a -> a) -> Result a -> a Source #

toList :: Result a -> [a] Source #

null :: Result a -> Bool Source #

length :: Result a -> Int Source #

elem :: Eq a => a -> Result a -> Bool Source #

maximum :: Ord a => Result a -> a Source #

minimum :: Ord a => Result a -> a Source #

sum :: Num a => Result a -> a Source #

product :: Num a => Result a -> a Source #

Traversable Result Source # |
Instance details Defined in Citeproc.Types Methods traverse :: Applicative f => (a -> f b) -> Result a -> f (Result b) Source # sequenceA :: Applicative f => Result (f a) -> f (Result a) Source # mapM :: Monad m => (a -> m b) -> Result a -> m (Result b) Source # sequence :: Monad m => Result (m a) -> m (Result a) Source #
Functor Result Source # |
Instance details Defined in Citeproc.Types Methods fmap :: (a -> b) -> Result a -> Result b Source # (<$) :: a -> Result b -> Result a Source #
FromJSON a => FromJSON (Result a) Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (Result a) Source # parseJSONList :: Value -> Parser [Result a] Source #
ToJSON a => ToJSON (Result a) Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Result a -> Value Source # toEncoding :: Result a -> Encoding Source # toJSONList :: [Result a] -> Value Source # toEncodingList :: [Result a] -> Encoding Source #
Show a => Show (Result a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Result a -> ShowS Source # show :: Result a -> String Source # showList :: [Result a] -> ShowS Source #

data Inputs a Source #

Inputs for citation processing.

Constructors

Inputs |

Fields

- inputsCitations :: Maybe [Citation a]
- inputsReferences :: Maybe [Reference a]
- inputsStyle :: Maybe Text
- inputsAbbreviations :: Maybe Abbreviations
- inputsLang :: Maybe Lang

#### Instances

Instances details

(FromJSON a, Eq a) => FromJSON (Inputs a) Source # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (Inputs a) Source # parseJSONList :: Value -> Parser [Inputs a] Source #
ToJSON a => ToJSON (Inputs a) Source # |
Instance details Defined in Citeproc.Types Methods toJSON :: Inputs a -> Value Source # toEncoding :: Inputs a -> Encoding Source # toJSONList :: [Inputs a] -> Value Source # toEncodingList :: [Inputs a] -> Encoding Source #
Show a => Show (Inputs a) Source # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Inputs a -> ShowS Source # show :: Inputs a -> String Source # showList :: [Inputs a] -> ShowS Source #