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

Safe Haskell | None
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 #

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

defaultCiteprocOptions :: CiteprocOptions #

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

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 #

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 #

#### Instances

Instances details

CiteprocOutput Inlines # |
Instance details Defined in Citeproc.Pandoc Methods toText :: Inlines -> Text # fromText :: Text -> Inlines # dropTextWhile :: (Char -> Bool) -> Inlines -> Inlines # dropTextWhileEnd :: (Char -> Bool) -> Inlines -> Inlines # addFontVariant :: FontVariant -> Inlines -> Inlines # addFontStyle :: FontStyle -> Inlines -> Inlines # addFontWeight :: FontWeight -> Inlines -> Inlines # addTextDecoration :: TextDecoration -> Inlines -> Inlines # addVerticalAlign :: VerticalAlign -> Inlines -> Inlines # addTextCase :: Maybe Lang -> TextCase -> Inlines -> Inlines # addDisplay :: DisplayStyle -> Inlines -> Inlines # addQuotes :: Inlines -> Inlines # movePunctuationInsideQuotes :: Inlines -> Inlines # inNote :: Inlines -> Inlines # mapText :: (Text -> Text) -> Inlines -> Inlines # addHyperlink :: Text -> Inlines -> Inlines # localizeQuotes :: Locale -> Inlines -> Inlines #
CiteprocOutput (CslJson Text) # |
Instance details Defined in Citeproc.CslJson Methods toText :: CslJson Text -> Text # fromText :: Text -> CslJson Text # dropTextWhile :: (Char -> Bool) -> CslJson Text -> CslJson Text # dropTextWhileEnd :: (Char -> Bool) -> CslJson Text -> CslJson Text # addFontVariant :: FontVariant -> CslJson Text -> CslJson Text # addFontStyle :: FontStyle -> CslJson Text -> CslJson Text # addFontWeight :: FontWeight -> CslJson Text -> CslJson Text # addTextDecoration :: TextDecoration -> CslJson Text -> CslJson Text # addVerticalAlign :: VerticalAlign -> CslJson Text -> CslJson Text # addTextCase :: Maybe Lang -> TextCase -> CslJson Text -> CslJson Text # addDisplay :: DisplayStyle -> CslJson Text -> CslJson Text # addQuotes :: CslJson Text -> CslJson Text # movePunctuationInsideQuotes :: CslJson Text -> CslJson Text # inNote :: CslJson Text -> CslJson Text # mapText :: (Text -> Text) -> CslJson Text -> CslJson Text # addHyperlink :: Text -> CslJson Text -> CslJson Text # localizeQuotes :: Locale -> CslJson Text -> CslJson Text #

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

data CiteprocError #

Constructors

CiteprocXMLError Text |
CiteprocParseError Text |
CiteprocLocaleNotFound Text |

#### Instances

Instances details

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

prettyCiteprocError :: CiteprocError -> Text #

newtype ItemId #

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

Constructors

ItemId |
Fields unItemId :: Text

#### Instances

Instances details

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

data CitationItem a #

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) # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (CitationItem a) # parseJSONList :: Value -> Parser [CitationItem a] # omittedField :: Maybe (CitationItem a) #
ToJSON a => ToJSON (CitationItem a) # |
Instance details Defined in Citeproc.Types Methods toJSON :: CitationItem a -> Value # toEncoding :: CitationItem a -> Encoding # toJSONList :: [CitationItem a] -> Value # toEncodingList :: [CitationItem a] -> Encoding # omitField :: CitationItem a -> Bool #
Show a => Show (CitationItem a) # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> CitationItem a -> ShowS # show :: CitationItem a -> String # showList :: [CitationItem a] -> ShowS #
Eq a => Eq (CitationItem a) # |
Instance details Defined in Citeproc.Types Methods (==) :: CitationItem a -> CitationItem a -> Bool # (/=) :: CitationItem a -> CitationItem a -> Bool #
Ord a => Ord (CitationItem a) # |
Instance details Defined in Citeproc.Types Methods compare :: CitationItem a -> CitationItem a -> Ordering # (<) :: CitationItem a -> CitationItem a -> Bool # (<=) :: CitationItem a -> CitationItem a -> Bool # (>) :: CitationItem a -> CitationItem a -> Bool # (>=) :: CitationItem a -> CitationItem a -> Bool # max :: CitationItem a -> CitationItem a -> CitationItem a # min :: CitationItem a -> CitationItem a -> CitationItem a #

data CitationItemType #

Constructors

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

#### Instances

Instances details

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

data Citation a #

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) # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (Citation a) # parseJSONList :: Value -> Parser [Citation a] # omittedField :: Maybe (Citation a) #
ToJSON a => ToJSON (Citation a) # |
Instance details Defined in Citeproc.Types Methods toJSON :: Citation a -> Value # toEncoding :: Citation a -> Encoding # toJSONList :: [Citation a] -> Value # toEncodingList :: [Citation a] -> Encoding # omitField :: Citation a -> Bool #
Show a => Show (Citation a) # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Citation a -> ShowS # show :: Citation a -> String # showList :: [Citation a] -> ShowS #
Eq a => Eq (Citation a) # |
Instance details Defined in Citeproc.Types Methods (==) :: Citation a -> Citation a -> Bool # (/=) :: Citation a -> Citation a -> Bool #
Ord a => Ord (Citation a) # |
Instance details Defined in Citeproc.Types Methods compare :: Citation a -> Citation a -> Ordering # (<) :: Citation a -> Citation a -> Bool # (<=) :: Citation a -> Citation a -> Bool # (>) :: Citation a -> Citation a -> Bool # (>=) :: Citation a -> Citation a -> Bool # max :: Citation a -> Citation a -> Citation a # min :: Citation a -> Citation a -> Citation a #

data ElementType a #

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

data Element a #

Constructors

Element (ElementType a) Formatting |

#### Instances

Instances details

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

data NumberForm #

Constructors

NumberNumeric |
NumberOrdinal |
NumberLongOrdinal |
NumberRoman |

#### Instances

Instances details

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

data Pluralize #

Constructors

ContextualPluralize |
AlwaysPluralize |
NeverPluralize |

#### Instances

Instances details

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

data DateType #

Constructors

LocalizedNumeric |
LocalizedText |
NonLocalized |

#### Instances

Instances details

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

data Date #

Constructors

Date |
Fields dateParts :: [DateParts] dateCirca :: Bool dateSeason :: Maybe Int dateLiteral :: Maybe Text

#### Instances

Instances details

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

rawDateEDTF :: Text -> Maybe Date #

newtype DateParts #

Constructors

DateParts [Int] |

#### Instances

Instances details

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

data ShowDateParts #

Constructors

YearMonthDay |
YearMonth |
Year |

#### Instances

Instances details

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

data DPName #

Constructors

DPYear |
DPMonth |
DPDay |

#### Instances

Instances details

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

data DPForm #

Constructors

DPNumeric |
DPNumericLeadingZeros |
DPOrdinal |
DPLong |
DPShort |

#### Instances

Instances details

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

data DP #

Constructors

DP |
Fields dpName :: DPName dpForm :: DPForm dpRangeDelimiter :: Text dpFormatting :: Formatting

#### Instances

Instances details

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

data VariableForm #

Constructors

ShortForm |
LongForm |

#### Instances

Instances details

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

data TextType #

Constructors

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

#### Instances

Instances details

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

data NameFormat #

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

defaultNameFormat :: NameFormat #

data NameAsSortOrder #

Constructors

NameAsSortOrderFirst |
NameAsSortOrderAll |

#### Instances

Instances details

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

data NamesFormat #

Constructors

NamesFormat |
Fields namesLabel :: Maybe (TermForm, Pluralize, Formatting) namesEtAl :: Maybe (Text, Formatting) namesName :: Maybe (NameFormat, Formatting) namesLabelBeforeName :: Bool

#### Instances

Instances details

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

data NameForm #

Constructors

LongName |
ShortName |
CountName |

#### Instances

Instances details

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

data Name #

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

extractParticles :: Name -> Name #

isByzantineName :: Name -> Bool #

data DelimiterPrecedes #

Constructors

PrecedesContextual |
PrecedesAfterInvertedName |
PrecedesAlways |
PrecedesNever |

#### Instances

Instances details

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

data Condition #

Constructors

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

#### Instances

Instances details

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

data Position #

Constructors

FirstPosition |
IbidWithLocator |
Ibid |
NearNote |
Subsequent |

#### Instances

Instances details

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

data Match #

Constructors

MatchAll |
MatchAny |
MatchNone |

#### Instances

Instances details

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

data Formatting #

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

data FontStyle #

Constructors

NormalFont |
ItalicFont |
ObliqueFont |

#### Instances

Instances details

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

data FontVariant #

Constructors

NormalVariant |
SmallCapsVariant |

#### Instances

Instances details

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

data FontWeight #

Constructors

NormalWeight |
BoldWeight |
LightWeight |

#### Instances

Instances details

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

data TextDecoration #

Constructors

NoDecoration |
UnderlineDecoration |

#### Instances

Instances details

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

data VerticalAlign #

Constructors

BaselineAlign |
SupAlign |
SubAlign |

#### Instances

Instances details

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

data DisplayStyle #

Constructors

DisplayBlock |
DisplayLeftMargin |
DisplayRightInline |
DisplayIndent |

#### Instances

Instances details

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

data TextCase #

Constructors

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

#### Instances

Instances details

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

data DemoteNonDroppingParticle #

Constructors

DemoteDisplayAndSort |
DemoteSortOnly |
DemoteNever |

#### Instances

Instances details

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

data StyleOptions #

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

data SubsequentAuthorSubstitute #

Constructors

SubsequentAuthorSubstitute Text SubsequentAuthorSubstituteRule |

#### Instances

Instances details

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

data SubsequentAuthorSubstituteRule #

Constructors

CompleteAll |
CompleteEach |
PartialEach |
PartialFirst |

#### Instances

Instances details

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

data SecondFieldAlign #

Constructors

SecondFieldAlignFlush |
SecondFieldAlignMargin |

#### Instances

Instances details

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

data PageRangeFormat #

Constructors

PageRangeChicago15 |
PageRangeChicago16 |
PageRangeExpanded |
PageRangeMinimal |
PageRangeMinimalTwo |

#### Instances

Instances details

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

data Style a #

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

data TermMatch #

Constructors

LastDigit |
LastTwoDigits |
WholeNumber |

#### Instances

Instances details

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

data TermGender #

Constructors

Masculine |
Feminine |

#### Instances

Instances details

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

data TermNumber #

Constructors

Singular |
Plural |

#### Instances

Instances details

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

data TermForm #

Constructors

Long |
Short |
Verb |
VerbShort |
Symbol |

#### Instances

Instances details

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

data Term #

Constructors

Term |
Fields termName :: Text termForm :: TermForm termNumber :: Maybe TermNumber termGender :: Maybe TermGender termGenderForm :: Maybe TermGender termMatch :: Maybe TermMatch

#### Instances

Instances details

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

emptyTerm :: Term #

data SortDirection #

Constructors

Ascending |
Descending |

#### Instances

Instances details

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

data SortKey a #

Constructors

SortKeyVariable SortDirection Variable |
SortKeyMacro SortDirection [Element a] |

#### Instances

Instances details

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

data SortKeyValue #

Constructors

SortKeyValue SortDirection (Maybe [Text]) |

#### Instances

Instances details

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

data LayoutOptions #

Constructors

LayoutOptions |
Fields layoutCollapse :: Maybe Collapsing layoutYearSuffixDelimiter :: Maybe Text layoutAfterCollapseDelimiter :: Maybe Text

#### Instances

Instances details

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

data Collapsing #

Constructors

CollapseCitationNumber |
CollapseYear |
CollapseYearSuffix |
CollapseYearSuffixRanged |

#### Instances

Instances details

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

data Layout a #

Constructors

Layout |
Fields layoutOptions :: LayoutOptions layoutFormatting :: Formatting layoutElements :: [Element a] layoutSortKeys :: [SortKey a]

#### Instances

Instances details

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

data DisambiguationStrategy #

Constructors

DisambiguationStrategy |
Fields disambiguateAddNames :: Bool disambiguateAddGivenNames :: Maybe GivenNameDisambiguationRule disambiguateAddYearSuffix :: Bool

#### Instances

Instances details

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

data GivenNameDisambiguationRule #

Constructors

AllNames |
AllNamesWithInitials |
PrimaryName |
PrimaryNameWithInitials |
ByCite |

#### Instances

Instances details

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

data Lang #

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

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

parseLang :: Text -> Either String Lang #

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

renderLang :: Lang -> Text #

Render a `Lang` in BCP 47 form.

data Locale #

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

data DisambiguationData #

Constructors

DisambiguationData |
Fields disambYearSuffix :: Maybe Int disambNameMap :: Map Name NameHints disambEtAlNames :: Maybe Int disambCondition :: Bool

#### Instances

Instances details

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

data NameHints #

Constructors

AddInitials |
AddGivenName |
AddInitialsIfPrimary |
AddGivenNameIfPrimary |

#### Instances

Instances details

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

data Reference a #

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

Functor Reference # |
Instance details Defined in Citeproc.Types Methods fmap :: (a -> b) -> Reference a -> Reference b # (<$) :: a -> Reference b -> Reference a #
Foldable Reference # |
Instance details Defined in Citeproc.Types Methods fold :: Monoid m => Reference m -> m # foldMap :: Monoid m => (a -> m) -> Reference a -> m # foldMap' :: Monoid m => (a -> m) -> Reference a -> m # foldr :: (a -> b -> b) -> b -> Reference a -> b # foldr' :: (a -> b -> b) -> b -> Reference a -> b # foldl :: (b -> a -> b) -> b -> Reference a -> b # foldl' :: (b -> a -> b) -> b -> Reference a -> b # foldr1 :: (a -> a -> a) -> Reference a -> a # foldl1 :: (a -> a -> a) -> Reference a -> a # toList :: Reference a -> [a] # null :: Reference a -> Bool # length :: Reference a -> Int # elem :: Eq a => a -> Reference a -> Bool # maximum :: Ord a => Reference a -> a # minimum :: Ord a => Reference a -> a # sum :: Num a => Reference a -> a # product :: Num a => Reference a -> a #
Traversable Reference # |
Instance details Defined in Citeproc.Types Methods traverse :: Applicative f => (a -> f b) -> Reference a -> f (Reference b) # sequenceA :: Applicative f => Reference (f a) -> f (Reference a) # mapM :: Monad m => (a -> m b) -> Reference a -> m (Reference b) # sequence :: Monad m => Reference (m a) -> m (Reference a) #
(Eq a, FromJSON a) => FromJSON (Reference a) # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (Reference a) # parseJSONList :: Value -> Parser [Reference a] # omittedField :: Maybe (Reference a) #
ToJSON a => ToJSON (Reference a) # |
Instance details Defined in Citeproc.Types Methods toJSON :: Reference a -> Value # toEncoding :: Reference a -> Encoding # toJSONList :: [Reference a] -> Value # toEncodingList :: [Reference a] -> Encoding # omitField :: Reference a -> Bool #
Show a => Show (Reference a) # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Reference a -> ShowS # show :: Reference a -> String # showList :: [Reference a] -> ShowS #
Eq a => Eq (Reference a) # |
Instance details Defined in Citeproc.Types Methods (==) :: Reference a -> Reference a -> Bool # (/=) :: Reference a -> Reference a -> Bool #
Ord a => Ord (Reference a) # |
Instance details Defined in Citeproc.Types Methods compare :: Reference a -> Reference a -> Ordering # (<) :: Reference a -> Reference a -> Bool # (<=) :: Reference a -> Reference a -> Bool # (>) :: Reference a -> Reference a -> Bool # (>=) :: Reference a -> Reference a -> Bool # max :: Reference a -> Reference a -> Reference a # min :: Reference a -> Reference a -> Reference a #

newtype ReferenceMap a #

Constructors

ReferenceMap |
Fields unReferenceMap :: Map ItemId (Reference a)

#### Instances

Instances details

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

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

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) #

data Val a #

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

Functor Val # |
Instance details Defined in Citeproc.Types Methods fmap :: (a -> b) -> Val a -> Val b # (<$) :: a -> Val b -> Val a #
Foldable Val # |
Instance details Defined in Citeproc.Types Methods fold :: Monoid m => Val m -> m # foldMap :: Monoid m => (a -> m) -> Val a -> m # foldMap' :: Monoid m => (a -> m) -> Val a -> m # foldr :: (a -> b -> b) -> b -> Val a -> b # foldr' :: (a -> b -> b) -> b -> Val a -> b # foldl :: (b -> a -> b) -> b -> Val a -> b # foldl' :: (b -> a -> b) -> b -> Val a -> b # foldr1 :: (a -> a -> a) -> Val a -> a # foldl1 :: (a -> a -> a) -> Val a -> a # toList :: Val a -> [a] # null :: Val a -> Bool # length :: Val a -> Int # elem :: Eq a => a -> Val a -> Bool # maximum :: Ord a => Val a -> a # minimum :: Ord a => Val a -> a # sum :: Num a => Val a -> a # product :: Num a => Val a -> a #
Traversable Val # |
Instance details Defined in Citeproc.Types Methods traverse :: Applicative f => (a -> f b) -> Val a -> f (Val b) # sequenceA :: Applicative f => Val (f a) -> f (Val a) # mapM :: Monad m => (a -> m b) -> Val a -> m (Val b) # sequence :: Monad m => Val (m a) -> m (Val a) #
ToJSON a => ToJSON (Val a) # |
Instance details Defined in Citeproc.Types Methods toJSON :: Val a -> Value # toEncoding :: Val a -> Encoding # toJSONList :: [Val a] -> Value # toEncodingList :: [Val a] -> Encoding # omitField :: Val a -> Bool #
Show a => Show (Val a) # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Val a -> ShowS # show :: Val a -> String # showList :: [Val a] -> ShowS #
Eq a => Eq (Val a) # |
Instance details Defined in Citeproc.Types Methods (==) :: Val a -> Val a -> Bool # (/=) :: Val a -> Val a -> Bool #
Ord a => Ord (Val a) # |
Instance details Defined in Citeproc.Types Methods compare :: Val a -> Val a -> Ordering # (<) :: Val a -> Val a -> Bool # (<=) :: Val a -> Val a -> Bool # (>) :: Val a -> Val a -> Bool # (>=) :: Val a -> Val a -> Bool # max :: Val a -> Val a -> Val a # min :: Val a -> Val a -> Val a #

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

data Variable #

#### Instances

Instances details

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

toVariable :: Text -> Variable #

fromVariable :: Variable -> Text #

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

data Output a #

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

data Identifier #

Constructors

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

#### Instances

Instances details

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

identifierToURL :: Identifier -> Text #

fixShortDOI :: Text -> Text #

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

data Tag #

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

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 #

Constructors

DateVariable |
NameVariable |
NumberVariable |
StringVariable |
UnknownVariable |

#### Instances

Instances details

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

data Abbreviations #

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

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

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

data Result a #

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

Functor Result # |
Instance details Defined in Citeproc.Types Methods fmap :: (a -> b) -> Result a -> Result b # (<$) :: a -> Result b -> Result a #
Foldable Result # |
Instance details Defined in Citeproc.Types Methods fold :: Monoid m => Result m -> m # foldMap :: Monoid m => (a -> m) -> Result a -> m # foldMap' :: Monoid m => (a -> m) -> Result a -> m # foldr :: (a -> b -> b) -> b -> Result a -> b # foldr' :: (a -> b -> b) -> b -> Result a -> b # foldl :: (b -> a -> b) -> b -> Result a -> b # foldl' :: (b -> a -> b) -> b -> Result a -> b # foldr1 :: (a -> a -> a) -> Result a -> a # foldl1 :: (a -> a -> a) -> Result a -> a # toList :: Result a -> [a] # null :: Result a -> Bool # length :: Result a -> Int # elem :: Eq a => a -> Result a -> Bool # maximum :: Ord a => Result a -> a # minimum :: Ord a => Result a -> a # sum :: Num a => Result a -> a # product :: Num a => Result a -> a #
Traversable Result # |
Instance details Defined in Citeproc.Types Methods traverse :: Applicative f => (a -> f b) -> Result a -> f (Result b) # sequenceA :: Applicative f => Result (f a) -> f (Result a) # mapM :: Monad m => (a -> m b) -> Result a -> m (Result b) # sequence :: Monad m => Result (m a) -> m (Result a) #
FromJSON a => FromJSON (Result a) # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (Result a) # parseJSONList :: Value -> Parser [Result a] # omittedField :: Maybe (Result a) #
ToJSON a => ToJSON (Result a) # |
Instance details Defined in Citeproc.Types Methods toJSON :: Result a -> Value # toEncoding :: Result a -> Encoding # toJSONList :: [Result a] -> Value # toEncodingList :: [Result a] -> Encoding # omitField :: Result a -> Bool #
Show a => Show (Result a) # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Result a -> ShowS # show :: Result a -> String # showList :: [Result a] -> ShowS #

data Inputs a #

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) # |
Instance details Defined in Citeproc.Types Methods parseJSON :: Value -> Parser (Inputs a) # parseJSONList :: Value -> Parser [Inputs a] # omittedField :: Maybe (Inputs a) #
ToJSON a => ToJSON (Inputs a) # |
Instance details Defined in Citeproc.Types Methods toJSON :: Inputs a -> Value # toEncoding :: Inputs a -> Encoding # toJSONList :: [Inputs a] -> Value # toEncodingList :: [Inputs a] -> Encoding # omitField :: Inputs a -> Bool #
Show a => Show (Inputs a) # |
Instance details Defined in Citeproc.Types Methods showsPrec :: Int -> Inputs a -> ShowS # show :: Inputs a -> String # showList :: [Inputs a] -> ShowS #