Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Citeproc.Types
Synopsis
- data CiteprocOptions = CiteprocOptions {}
- 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
- prettyCiteprocError :: CiteprocError -> Text
- newtype ItemId = ItemId {}
- data CitationItem a = CitationItem {}
- data CitationItemType
- data Citation a = Citation {
- citationId :: Maybe Text
- citationNoteNumber :: Maybe Int
- citationItems :: [CitationItem a]
- data ElementType a
- data Element a = Element (ElementType a) Formatting
- data NumberForm
- data Pluralize
- data DateType
- data Date = Date {
- dateParts :: [DateParts]
- dateCirca :: Bool
- dateSeason :: Maybe Int
- dateLiteral :: Maybe Text
- rawDateEDTF :: Text -> Maybe Date
- newtype DateParts = DateParts [Int]
- data ShowDateParts
- data DPName
- data DPForm
- data DP = DP {}
- data VariableForm
- data TextType
- 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
- data NamesFormat = NamesFormat {
- namesLabel :: Maybe (TermForm, Pluralize, Formatting)
- namesEtAl :: Maybe (Text, Formatting)
- namesName :: Maybe (NameFormat, Formatting)
- namesLabelBeforeName :: Bool
- data NameForm
- data Name = Name {}
- extractParticles :: Name -> Name
- isByzantineName :: Name -> Bool
- data DelimiterPrecedes
- data Condition
- data Position
- data Match
- 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
- data FontVariant
- data FontWeight
- data TextDecoration
- data VerticalAlign
- data DisplayStyle
- data TextCase
- data DemoteNonDroppingParticle
- 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
- data SecondFieldAlign
- data PageRangeFormat
- data Style a = Style {
- styleCslVersion :: (Int, Int, Int)
- styleOptions :: StyleOptions
- styleCitation :: Layout a
- styleBibliography :: Maybe (Layout a)
- styleLocales :: [Locale]
- styleAbbreviations :: Maybe Abbreviations
- data TermMatch
- data TermGender
- data TermNumber
- data TermForm
- data Term = Term {}
- emptyTerm :: Term
- data SortDirection
- data SortKey a
- data SortKeyValue = SortKeyValue SortDirection (Maybe [Text])
- data LayoutOptions = LayoutOptions {}
- data Collapsing
- data Layout a = Layout {
- layoutOptions :: LayoutOptions
- layoutFormatting :: Formatting
- layoutElements :: [Element a]
- layoutSortKeys :: [SortKey a]
- data DisambiguationStrategy = DisambiguationStrategy {}
- data GivenNameDisambiguationRule
- 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 {}
- data DisambiguationData = DisambiguationData {}
- data NameHints
- data Reference a = Reference {}
- 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
- 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
- data Identifier
- identifierToURL :: Identifier -> Text
- fixShortDOI :: Text -> Text
- data Tag
- 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
- 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 {}
Documentation
data CiteprocOptions Source #
Options affecting the output in ways that go beyond what can be specified in styles.
Constructors
CiteprocOptions | |
Fields
|
Instances
Show CiteprocOptions Source # | |
Defined in Citeproc.Types | |
Eq CiteprocOptions Source # | |
Defined in Citeproc.Types Methods (==) :: CiteprocOptions -> CiteprocOptions -> Bool Source # (/=) :: CiteprocOptions -> CiteprocOptions -> Bool 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
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 #
movePunctuationInsideQuotes :: a -> a Source #
mapText :: (Text -> Text) -> a -> a Source #
addHyperlink :: Text -> a -> a Source #
localizeQuotes :: Locale -> a -> a Source #
Instances
addFormatting :: CiteprocOutput a => Formatting -> a -> a Source #
data CiteprocError Source #
Constructors
CiteprocXMLError Text | |
CiteprocParseError Text | |
CiteprocLocaleNotFound Text |
Instances
Show CiteprocError Source # | |
Defined in Citeproc.Types | |
Eq CiteprocError Source # | |
Defined in Citeproc.Types Methods (==) :: CiteprocError -> CiteprocError -> Bool Source # (/=) :: CiteprocError -> CiteprocError -> Bool Source # |
The identifier used to identify a work in a bibliographic database.
Instances
FromJSON ItemId Source # | |
Defined in Citeproc.Types | |
ToJSON ItemId Source # | |
Defined in Citeproc.Types Methods toEncoding :: ItemId -> Encoding toJSONList :: [ItemId] -> Value toEncodingList :: [ItemId] -> Encoding | |
Monoid ItemId Source # | |
Semigroup ItemId Source # | |
Show ItemId Source # | |
Eq ItemId Source # | |
Ord 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 |
Instances
data CitationItemType Source #
Constructors
AuthorOnly | e.g., Smith |
SuppressAuthor | e.g., (2000, p. 30) |
NormalCite | e.g., (Smith 2000, p. 30) |
Instances
A citation (which may include several items, e.g.
in (Smith 2000; Jones 2010, p. 30)
).
Constructors
Citation | |
Fields
|
Instances
FromJSON a => FromJSON (Citation a) Source # | |
Defined in Citeproc.Types | |
ToJSON a => ToJSON (Citation a) Source # | |
Defined in Citeproc.Types Methods toEncoding :: Citation a -> Encoding toJSONList :: [Citation a] -> Value toEncodingList :: [Citation a] -> Encoding | |
Show a => Show (Citation a) Source # | |
Eq a => Eq (Citation a) Source # | |
Ord a => Ord (Citation a) Source # | |
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 # |
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
Show (ElementType a) Source # | |
Defined in Citeproc.Types | |
Eq (ElementType a) Source # | |
Defined in Citeproc.Types Methods (==) :: ElementType a -> ElementType a -> Bool Source # (/=) :: ElementType a -> ElementType a -> Bool Source # |
Constructors
Element (ElementType a) Formatting |
data NumberForm Source #
Constructors
NumberNumeric | |
NumberOrdinal | |
NumberLongOrdinal | |
NumberRoman |
Instances
Show NumberForm Source # | |
Defined in Citeproc.Types | |
Eq NumberForm Source # | |
Defined in Citeproc.Types Methods (==) :: NumberForm -> NumberForm -> Bool Source # (/=) :: NumberForm -> NumberForm -> Bool Source # |
Constructors
ContextualPluralize | |
AlwaysPluralize | |
NeverPluralize |
Constructors
LocalizedNumeric | |
LocalizedText | |
NonLocalized |
Instances
Show DateType Source # | |
Eq DateType Source # | |
Ord DateType Source # | |
Defined in Citeproc.Types |
Constructors
Date | |
Fields
|
Instances
FromJSON DateParts Source # | |
Defined in Citeproc.Types | |
ToJSON DateParts Source # | |
Defined in Citeproc.Types Methods toEncoding :: DateParts -> Encoding toJSONList :: [DateParts] -> Value toEncodingList :: [DateParts] -> Encoding | |
Show DateParts Source # | |
Eq DateParts Source # | |
Ord DateParts Source # | |
Defined in Citeproc.Types |
data ShowDateParts Source #
Constructors
YearMonthDay | |
YearMonth | |
Year |
Instances
Show ShowDateParts Source # | |
Defined in Citeproc.Types | |
Eq ShowDateParts Source # | |
Defined in Citeproc.Types Methods (==) :: ShowDateParts -> ShowDateParts -> Bool Source # (/=) :: ShowDateParts -> ShowDateParts -> Bool Source # |
Instances
Show DPName Source # | |
Eq DPName Source # | |
Ord DPName Source # | |
Constructors
DPNumeric | |
DPNumericLeadingZeros | |
DPOrdinal | |
DPLong | |
DPShort |
Constructors
DP | |
Fields
|
data VariableForm Source #
Instances
Show VariableForm Source # | |
Defined in Citeproc.Types | |
Eq VariableForm Source # | |
Defined in Citeproc.Types Methods (==) :: VariableForm -> VariableForm -> Bool Source # (/=) :: VariableForm -> VariableForm -> Bool Source # |
Constructors
TextVariable VariableForm Variable | |
TextMacro Text | |
TextTerm Term | |
TextValue Text |
data NameFormat Source #
Constructors
Instances
Show NameFormat Source # | |
Defined in Citeproc.Types | |
Eq NameFormat Source # | |
Defined in Citeproc.Types Methods (==) :: NameFormat -> NameFormat -> Bool Source # (/=) :: NameFormat -> NameFormat -> Bool Source # |
data NameAsSortOrder Source #
Constructors
NameAsSortOrderFirst | |
NameAsSortOrderAll |
Instances
Show NameAsSortOrder Source # | |
Defined in Citeproc.Types | |
Eq NameAsSortOrder Source # | |
Defined in Citeproc.Types Methods (==) :: NameAsSortOrder -> NameAsSortOrder -> Bool Source # (/=) :: NameAsSortOrder -> NameAsSortOrder -> Bool Source # |
data NamesFormat Source #
Constructors
NamesFormat | |
Fields
|
Instances
Show NamesFormat Source # | |
Defined in Citeproc.Types | |
Eq NamesFormat Source # | |
Defined in Citeproc.Types Methods (==) :: NamesFormat -> NamesFormat -> Bool Source # (/=) :: NamesFormat -> NamesFormat -> Bool Source # |
Constructors
Name | |
Fields
|
extractParticles :: Name -> Name Source #
isByzantineName :: Name -> Bool Source #
data DelimiterPrecedes Source #
Instances
Show DelimiterPrecedes Source # | |
Defined in Citeproc.Types | |
Eq DelimiterPrecedes Source # | |
Defined in Citeproc.Types Methods (==) :: DelimiterPrecedes -> DelimiterPrecedes -> Bool Source # (/=) :: DelimiterPrecedes -> DelimiterPrecedes -> Bool Source # |
Constructors
HasVariable Variable | |
HasType Text | |
IsUncertainDate Variable | |
IsNumeric Variable | |
HasLocatorType Variable | |
HasPosition Position | |
WouldDisambiguate |
Constructors
FirstPosition | |
IbidWithLocator | |
Ibid | |
NearNote | |
Subsequent |
Instances
Show Position Source # | |
Eq Position Source # | |
Ord Position Source # | |
Defined in Citeproc.Types |
Instances
data Formatting Source #
Constructors
Instances
Monoid Formatting Source # | |
Defined in Citeproc.Types Methods mempty :: Formatting Source # mappend :: Formatting -> Formatting -> Formatting Source # mconcat :: [Formatting] -> Formatting Source # | |
Semigroup Formatting Source # | |
Defined in Citeproc.Types Methods (<>) :: Formatting -> Formatting -> Formatting Source # sconcat :: NonEmpty Formatting -> Formatting Source # stimes :: Integral b => b -> Formatting -> Formatting Source # | |
Show Formatting Source # | |
Defined in Citeproc.Types | |
Eq Formatting Source # | |
Defined in Citeproc.Types Methods (==) :: Formatting -> Formatting -> Bool Source # (/=) :: Formatting -> Formatting -> Bool Source # |
Constructors
NormalFont | |
ItalicFont | |
ObliqueFont |
data FontVariant Source #
Constructors
NormalVariant | |
SmallCapsVariant |
Instances
Show FontVariant Source # | |
Defined in Citeproc.Types | |
Eq FontVariant Source # | |
Defined in Citeproc.Types Methods (==) :: FontVariant -> FontVariant -> Bool Source # (/=) :: FontVariant -> FontVariant -> Bool Source # |
data FontWeight Source #
Constructors
NormalWeight | |
BoldWeight | |
LightWeight |
Instances
Show FontWeight Source # | |
Defined in Citeproc.Types | |
Eq FontWeight Source # | |
Defined in Citeproc.Types Methods (==) :: FontWeight -> FontWeight -> Bool Source # (/=) :: FontWeight -> FontWeight -> Bool Source # |
data TextDecoration Source #
Constructors
NoDecoration | |
UnderlineDecoration |
Instances
Show TextDecoration Source # | |
Defined in Citeproc.Types | |
Eq TextDecoration Source # | |
Defined in Citeproc.Types Methods (==) :: TextDecoration -> TextDecoration -> Bool Source # (/=) :: TextDecoration -> TextDecoration -> Bool Source # |
data VerticalAlign Source #
Constructors
BaselineAlign | |
SupAlign | |
SubAlign |
Instances
Show VerticalAlign Source # | |
Defined in Citeproc.Types | |
Eq VerticalAlign Source # | |
Defined in Citeproc.Types Methods (==) :: VerticalAlign -> VerticalAlign -> Bool Source # (/=) :: VerticalAlign -> VerticalAlign -> Bool Source # |
data DisplayStyle Source #
Constructors
DisplayBlock | |
DisplayLeftMargin | |
DisplayRightInline | |
DisplayIndent |
Instances
Show DisplayStyle Source # | |
Defined in Citeproc.Types | |
Eq DisplayStyle Source # | |
Defined in Citeproc.Types Methods (==) :: DisplayStyle -> DisplayStyle -> Bool Source # (/=) :: DisplayStyle -> DisplayStyle -> Bool Source # |
Constructors
Lowercase | |
Uppercase | |
CapitalizeFirst | |
CapitalizeAll | |
SentenceCase | |
TitleCase |
data DemoteNonDroppingParticle Source #
Constructors
DemoteDisplayAndSort | |
DemoteSortOnly | |
DemoteNever |
Instances
Show DemoteNonDroppingParticle Source # | |
Defined in Citeproc.Types | |
Eq DemoteNonDroppingParticle Source # | |
Defined in Citeproc.Types Methods (==) :: DemoteNonDroppingParticle -> DemoteNonDroppingParticle -> Bool Source # (/=) :: DemoteNonDroppingParticle -> DemoteNonDroppingParticle -> Bool Source # |
data StyleOptions Source #
Constructors
Instances
Show StyleOptions Source # | |
Defined in Citeproc.Types | |
Eq StyleOptions Source # | |
Defined in Citeproc.Types Methods (==) :: StyleOptions -> StyleOptions -> Bool Source # (/=) :: StyleOptions -> StyleOptions -> Bool Source # |
data SubsequentAuthorSubstitute Source #
Instances
Show SubsequentAuthorSubstitute Source # | |
Defined in Citeproc.Types | |
Eq SubsequentAuthorSubstitute Source # | |
Defined in Citeproc.Types Methods (==) :: SubsequentAuthorSubstitute -> SubsequentAuthorSubstitute -> Bool Source # (/=) :: SubsequentAuthorSubstitute -> SubsequentAuthorSubstitute -> Bool Source # |
data SubsequentAuthorSubstituteRule Source #
Constructors
CompleteAll | |
CompleteEach | |
PartialEach | |
PartialFirst |
Instances
Show SubsequentAuthorSubstituteRule Source # | |
Defined in Citeproc.Types | |
Eq SubsequentAuthorSubstituteRule Source # | |
Defined in Citeproc.Types |
data SecondFieldAlign Source #
Constructors
SecondFieldAlignFlush | |
SecondFieldAlignMargin |
Instances
Show SecondFieldAlign Source # | |
Defined in Citeproc.Types | |
Eq SecondFieldAlign Source # | |
Defined in Citeproc.Types Methods (==) :: SecondFieldAlign -> SecondFieldAlign -> Bool Source # (/=) :: SecondFieldAlign -> SecondFieldAlign -> Bool Source # |
data PageRangeFormat Source #
Instances
Show PageRangeFormat Source # | |
Defined in Citeproc.Types | |
Eq PageRangeFormat Source # | |
Defined in Citeproc.Types Methods (==) :: PageRangeFormat -> PageRangeFormat -> Bool Source # (/=) :: PageRangeFormat -> PageRangeFormat -> Bool Source # | |
Ord PageRangeFormat Source # | |
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 # |
Constructors
Style | |
Fields
|
Constructors
LastDigit | |
LastTwoDigits | |
WholeNumber |
Instances
Show TermMatch Source # | |
Eq TermMatch Source # | |
Ord TermMatch Source # | |
Defined in Citeproc.Types |
data TermGender Source #
Instances
Show TermGender Source # | |
Defined in Citeproc.Types | |
Eq TermGender Source # | |
Defined in Citeproc.Types Methods (==) :: TermGender -> TermGender -> Bool Source # (/=) :: TermGender -> TermGender -> Bool Source # | |
Ord TermGender Source # | |
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 #
Instances
Show TermNumber Source # | |
Defined in Citeproc.Types | |
Eq TermNumber Source # | |
Defined in Citeproc.Types Methods (==) :: TermNumber -> TermNumber -> Bool Source # (/=) :: TermNumber -> TermNumber -> Bool Source # | |
Ord TermNumber Source # | |
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 # |
Instances
Show TermForm Source # | |
Eq TermForm Source # | |
Ord TermForm Source # | |
Defined in Citeproc.Types |
Constructors
Term | |
Fields
|
data SortDirection Source #
Constructors
Ascending | |
Descending |
Instances
Show SortDirection Source # | |
Defined in Citeproc.Types | |
Eq SortDirection Source # | |
Defined in Citeproc.Types Methods (==) :: SortDirection -> SortDirection -> Bool Source # (/=) :: SortDirection -> SortDirection -> Bool Source # |
Constructors
SortKeyVariable SortDirection Variable | |
SortKeyMacro SortDirection [Element a] |
data SortKeyValue Source #
Constructors
SortKeyValue SortDirection (Maybe [Text]) |
Instances
Show SortKeyValue Source # | |
Defined in Citeproc.Types | |
Eq SortKeyValue Source # | |
Defined in Citeproc.Types Methods (==) :: SortKeyValue -> SortKeyValue -> Bool Source # (/=) :: SortKeyValue -> SortKeyValue -> Bool Source # |
data LayoutOptions Source #
Constructors
LayoutOptions | |
Instances
Show LayoutOptions Source # | |
Defined in Citeproc.Types | |
Eq LayoutOptions Source # | |
Defined in Citeproc.Types Methods (==) :: LayoutOptions -> LayoutOptions -> Bool Source # (/=) :: LayoutOptions -> LayoutOptions -> Bool Source # |
data Collapsing Source #
Instances
Show Collapsing Source # | |
Defined in Citeproc.Types | |
Eq Collapsing Source # | |
Defined in Citeproc.Types Methods (==) :: Collapsing -> Collapsing -> Bool Source # (/=) :: Collapsing -> Collapsing -> Bool Source # |
Constructors
Layout | |
Fields
|
data DisambiguationStrategy Source #
Constructors
DisambiguationStrategy | |
Instances
Show DisambiguationStrategy Source # | |
Defined in Citeproc.Types | |
Eq DisambiguationStrategy Source # | |
Defined in Citeproc.Types Methods (==) :: DisambiguationStrategy -> DisambiguationStrategy -> Bool Source # (/=) :: DisambiguationStrategy -> DisambiguationStrategy -> Bool Source # | |
Ord DisambiguationStrategy Source # | |
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 #
Instances
Represents a BCP 47 language tag (https://tools.ietf.org/html/bcp47).
Constructors
Lang | |
Fields
|
Defines locale-specific terms, punctuation styles, and date formats.
Constructors
Locale | |
Fields
|
data DisambiguationData Source #
Constructors
DisambiguationData | |
Fields |
Instances
Show DisambiguationData Source # | |
Defined in Citeproc.Types |
Encodes bibliographic data for a single work.
Constructors
Reference | |
Fields
|
Instances
newtype ReferenceMap a Source #
Constructors
ReferenceMap | |
Fields
|
Instances
Show a => Show (ReferenceMap a) Source # | |
Defined in Citeproc.Types |
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 #
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 |
Instances
Foldable Val Source # | |
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 # | |
Traversable Val Source # | |
Functor Val Source # | |
ToJSON a => ToJSON (Val a) Source # | |
Defined in Citeproc.Types Methods toEncoding :: Val a -> Encoding toJSONList :: [Val a] -> Value toEncodingList :: [Val a] -> Encoding | |
Show a => Show (Val a) Source # | |
Eq a => Eq (Val a) Source # | |
Instances
FromJSON Variable Source # | |
Defined in Citeproc.Types | |
FromJSONKey Variable Source # | |
Defined in Citeproc.Types | |
ToJSON Variable Source # | |
Defined in Citeproc.Types Methods toEncoding :: Variable -> Encoding toJSONList :: [Variable] -> Value toEncodingList :: [Variable] -> Encoding | |
ToJSONKey Variable Source # | |
Defined in Citeproc.Types | |
IsString Variable Source # | |
Defined in Citeproc.Types Methods fromString :: String -> Variable Source # | |
Monoid Variable Source # | |
Semigroup Variable Source # | |
Show Variable Source # | |
Eq Variable Source # | |
Ord Variable Source # | |
Defined in Citeproc.Types |
toVariable :: Text -> Variable Source #
fromVariable :: Variable -> Text Source #
lookupVariable :: CiteprocOutput a => Variable -> Reference a -> Maybe (Val a) Source #
Constructors
Formatted Formatting [Output a] | |
Linked Text [Output a] | |
InNote (Output a) | |
Literal a | |
Tagged Tag (Output a) | |
NullOutput |
data Identifier Source #
Instances
Show Identifier Source # | |
Defined in Citeproc.Types | |
Eq Identifier Source # | |
Defined in Citeproc.Types Methods (==) :: Identifier -> Identifier -> Bool Source # (/=) :: Identifier -> Identifier -> Bool Source # |
identifierToURL :: Identifier -> Text Source #
fixShortDOI :: Text -> Text 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 |
outputToText :: CiteprocOutput a => Output a -> Text Source #
renderOutput :: CiteprocOutput a => CiteprocOptions -> Output a -> a Source #
variableType :: Variable -> VariableType Source #
data VariableType Source #
Instances
Show VariableType Source # | |
Defined in Citeproc.Types | |
Eq VariableType Source # | |
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
FromJSON Abbreviations Source # | |
Defined in Citeproc.Types | |
ToJSON Abbreviations Source # | |
Defined in Citeproc.Types Methods toJSON :: Abbreviations -> Value toEncoding :: Abbreviations -> Encoding toJSONList :: [Abbreviations] -> Value toEncodingList :: [Abbreviations] -> Encoding | |
Show Abbreviations Source # | |
Defined in Citeproc.Types | |
Eq Abbreviations Source # | |
Defined in Citeproc.Types Methods (==) :: Abbreviations -> Abbreviations -> Bool Source # (/=) :: Abbreviations -> Abbreviations -> Bool Source # | |
Ord Abbreviations Source # | |
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.
Result of citation processing.
Constructors
Result | |
Fields
|
Instances
Foldable Result Source # | |
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 # | |
Traversable Result Source # | |
Defined in Citeproc.Types | |
Functor Result Source # | |
FromJSON a => FromJSON (Result a) Source # | |
Defined in Citeproc.Types | |
ToJSON a => ToJSON (Result a) Source # | |
Defined in Citeproc.Types Methods toEncoding :: Result a -> Encoding toJSONList :: [Result a] -> Value toEncodingList :: [Result a] -> Encoding | |
Show a => Show (Result a) Source # | |
Inputs for citation processing.
Constructors
Inputs | |
Fields
|
Instances
(FromJSON a, Eq a) => FromJSON (Inputs a) Source # | |
Defined in Citeproc.Types | |
ToJSON a => ToJSON (Inputs a) Source # | |
Defined in Citeproc.Types Methods toEncoding :: Inputs a -> Encoding toJSONList :: [Inputs a] -> Value toEncodingList :: [Inputs a] -> Encoding | |
Show a => Show (Inputs a) Source # | |