-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Generates citations and bibliography from CSL styles.
--   
--   citeproc parses CSL style files and uses them to generate a list of
--   formatted citations and bibliography entries. For more information
--   about CSL, see <a>https://citationstyles.org/</a>.
@package citeproc
@version 0.7

module Citeproc.Types

-- | Options affecting the output in ways that go beyond what can be
--   specified in styles.
data CiteprocOptions
CiteprocOptions :: Bool -> Bool -> CiteprocOptions

-- | Create hyperlinks from citations to bibliography entries
[linkCitations] :: CiteprocOptions -> Bool

-- | Enables the following options:
--   
--   <ul>
--   <li>Automatically linkify any DOI, PMCID, PMID, or URL appearing in a
--   bibliography entry.</li>
--   <li>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.</li>
--   <li>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).</li>
--   </ul>
[linkBibliography] :: CiteprocOptions -> Bool
defaultCiteprocOptions :: CiteprocOptions

-- | CSL styles require certain formatting transformations to be defined.
--   These are defined in the <a>CiteprocOutput</a> class. The library may
--   be used with any structured format that defines these operations. See
--   the <a>CslJson</a> module for an instance that corresponds to the
--   markup allowed in CSL JSON. See the <a>Pandoc</a> module for an
--   instance for Pandoc <tt>Inlines</tt>.
class (Semigroup a, Monoid a, Show a, Eq a, Ord a) => CiteprocOutput a
toText :: CiteprocOutput a => a -> Text
fromText :: CiteprocOutput a => Text -> a
dropTextWhile :: CiteprocOutput a => (Char -> Bool) -> a -> a
dropTextWhileEnd :: CiteprocOutput a => (Char -> Bool) -> a -> a
addFontVariant :: CiteprocOutput a => FontVariant -> a -> a
addFontStyle :: CiteprocOutput a => FontStyle -> a -> a
addFontWeight :: CiteprocOutput a => FontWeight -> a -> a
addTextDecoration :: CiteprocOutput a => TextDecoration -> a -> a
addVerticalAlign :: CiteprocOutput a => VerticalAlign -> a -> a
addTextCase :: CiteprocOutput a => Maybe Lang -> TextCase -> a -> a
addDisplay :: CiteprocOutput a => DisplayStyle -> a -> a
addQuotes :: CiteprocOutput a => a -> a
movePunctuationInsideQuotes :: CiteprocOutput a => a -> a
inNote :: CiteprocOutput a => a -> a
mapText :: CiteprocOutput a => (Text -> Text) -> a -> a
addHyperlink :: CiteprocOutput a => Text -> a -> a
localizeQuotes :: CiteprocOutput a => Locale -> a -> a
addFormatting :: CiteprocOutput a => Formatting -> a -> a
data CiteprocError
CiteprocXMLError :: Text -> CiteprocError
CiteprocParseError :: Text -> CiteprocError
CiteprocLocaleNotFound :: Text -> CiteprocError
prettyCiteprocError :: CiteprocError -> Text

-- | The identifier used to identify a work in a bibliographic database.
newtype ItemId
ItemId :: Text -> ItemId
[unItemId] :: ItemId -> Text

-- | The part of a citation corresponding to a single work, possibly
--   including a label, locator, prefix and suffix.
data CitationItem a
CitationItem :: ItemId -> Maybe Text -> Maybe Text -> CitationItemType -> Maybe a -> Maybe a -> Maybe (Reference a) -> CitationItem a
[citationItemId] :: CitationItem a -> ItemId
[citationItemLabel] :: CitationItem a -> Maybe Text
[citationItemLocator] :: CitationItem a -> Maybe Text
[citationItemType] :: CitationItem a -> CitationItemType
[citationItemPrefix] :: CitationItem a -> Maybe a
[citationItemSuffix] :: CitationItem a -> Maybe a
[citationItemData] :: CitationItem a -> Maybe (Reference a)
data CitationItemType

-- | e.g., Smith
AuthorOnly :: CitationItemType

-- | e.g., (2000, p. 30)
SuppressAuthor :: CitationItemType

-- | e.g., (Smith 2000, p. 30)
NormalCite :: CitationItemType

-- | A citation (which may include several items, e.g. in <tt>(Smith 2000;
--   Jones 2010, p. 30)</tt>).
data Citation a
Citation :: Maybe Text -> Maybe Int -> [CitationItem a] -> Citation a
[citationId] :: Citation a -> Maybe Text
[citationNoteNumber] :: Citation a -> Maybe Int
[citationItems] :: Citation a -> [CitationItem a]
data ElementType a
EText :: TextType -> ElementType a
EDate :: Variable -> DateType -> Maybe ShowDateParts -> [DP] -> ElementType a
ENumber :: Variable -> NumberForm -> ElementType a
ENames :: [Variable] -> NamesFormat -> [Element a] -> ElementType a
ELabel :: Variable -> TermForm -> Pluralize -> ElementType a
EGroup :: Bool -> [Element a] -> ElementType a
EChoose :: [(Match, [Condition], [Element a])] -> ElementType a
data Element a
Element :: ElementType a -> Formatting -> Element a
data NumberForm
NumberNumeric :: NumberForm
NumberOrdinal :: NumberForm
NumberLongOrdinal :: NumberForm
NumberRoman :: NumberForm
data Pluralize
ContextualPluralize :: Pluralize
AlwaysPluralize :: Pluralize
NeverPluralize :: Pluralize
data DateType
LocalizedNumeric :: DateType
LocalizedText :: DateType
NonLocalized :: DateType
data Date
Date :: [DateParts] -> Bool -> Maybe Int -> Maybe Text -> Date
[dateParts] :: Date -> [DateParts]
[dateCirca] :: Date -> Bool
[dateSeason] :: Date -> Maybe Int
[dateLiteral] :: Date -> Maybe Text
rawDateEDTF :: Text -> Maybe Date
newtype DateParts
DateParts :: [Int] -> DateParts
data ShowDateParts
YearMonthDay :: ShowDateParts
YearMonth :: ShowDateParts
Year :: ShowDateParts
data DPName
DPYear :: DPName
DPMonth :: DPName
DPDay :: DPName
data DPForm
DPNumeric :: DPForm
DPNumericLeadingZeros :: DPForm
DPOrdinal :: DPForm
DPLong :: DPForm
DPShort :: DPForm
data DP
DP :: DPName -> DPForm -> Text -> Formatting -> DP
[dpName] :: DP -> DPName
[dpForm] :: DP -> DPForm
[dpRangeDelimiter] :: DP -> Text
[dpFormatting] :: DP -> Formatting
data VariableForm
ShortForm :: VariableForm
LongForm :: VariableForm
data TextType
TextVariable :: VariableForm -> Variable -> TextType
TextMacro :: Text -> TextType
TextTerm :: Term -> TextType
TextValue :: Text -> TextType
data NameFormat
NameFormat :: Maybe Formatting -> Maybe Formatting -> Maybe TermForm -> Text -> DelimiterPrecedes -> DelimiterPrecedes -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> NameForm -> Bool -> Maybe Text -> Maybe NameAsSortOrder -> Text -> NameFormat
[nameGivenFormatting] :: NameFormat -> Maybe Formatting
[nameFamilyFormatting] :: NameFormat -> Maybe Formatting
[nameAndStyle] :: NameFormat -> Maybe TermForm
[nameDelimiter] :: NameFormat -> Text
[nameDelimiterPrecedesEtAl] :: NameFormat -> DelimiterPrecedes
[nameDelimiterPrecedesLast] :: NameFormat -> DelimiterPrecedes
[nameEtAlMin] :: NameFormat -> Maybe Int
[nameEtAlUseFirst] :: NameFormat -> Maybe Int
[nameEtAlSubsequentUseFirst] :: NameFormat -> Maybe Int
[nameEtAlSubsequentMin] :: NameFormat -> Maybe Int
[nameEtAlUseLast] :: NameFormat -> Bool
[nameForm] :: NameFormat -> NameForm
[nameInitialize] :: NameFormat -> Bool
[nameInitializeWith] :: NameFormat -> Maybe Text
[nameAsSortOrder] :: NameFormat -> Maybe NameAsSortOrder
[nameSortSeparator] :: NameFormat -> Text
defaultNameFormat :: NameFormat
data NameAsSortOrder
NameAsSortOrderFirst :: NameAsSortOrder
NameAsSortOrderAll :: NameAsSortOrder
data NamesFormat
NamesFormat :: Maybe (TermForm, Pluralize, Formatting) -> Maybe (Text, Formatting) -> Maybe (NameFormat, Formatting) -> Bool -> NamesFormat
[namesLabel] :: NamesFormat -> Maybe (TermForm, Pluralize, Formatting)
[namesEtAl] :: NamesFormat -> Maybe (Text, Formatting)
[namesName] :: NamesFormat -> Maybe (NameFormat, Formatting)
[namesLabelBeforeName] :: NamesFormat -> Bool
data NameForm
LongName :: NameForm
ShortName :: NameForm
CountName :: NameForm
data Name
Name :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Bool -> Bool -> Maybe Text -> Name
[nameFamily] :: Name -> Maybe Text
[nameGiven] :: Name -> Maybe Text
[nameDroppingParticle] :: Name -> Maybe Text
[nameNonDroppingParticle] :: Name -> Maybe Text
[nameSuffix] :: Name -> Maybe Text
[nameCommaSuffix] :: Name -> Bool
[nameStaticOrdering] :: Name -> Bool
[nameLiteral] :: Name -> Maybe Text
extractParticles :: Name -> Name
isByzantineName :: Name -> Bool
data DelimiterPrecedes
PrecedesContextual :: DelimiterPrecedes
PrecedesAfterInvertedName :: DelimiterPrecedes
PrecedesAlways :: DelimiterPrecedes
PrecedesNever :: DelimiterPrecedes
data Condition
HasVariable :: Variable -> Condition
HasType :: Text -> Condition
IsUncertainDate :: Variable -> Condition
IsNumeric :: Variable -> Condition
HasLocatorType :: Variable -> Condition
HasPosition :: Position -> Condition
WouldDisambiguate :: Condition
data Position
FirstPosition :: Position
IbidWithLocator :: Position
Ibid :: Position
NearNote :: Position
Subsequent :: Position
data Match
MatchAll :: Match
MatchAny :: Match
MatchNone :: Match
data Formatting
Formatting :: Maybe Lang -> Maybe FontStyle -> Maybe FontVariant -> Maybe FontWeight -> Maybe TextDecoration -> Maybe VerticalAlign -> Maybe Text -> Maybe Text -> Maybe DisplayStyle -> Maybe TextCase -> Maybe Text -> Bool -> Bool -> Bool -> Formatting
[formatLang] :: Formatting -> Maybe Lang
[formatFontStyle] :: Formatting -> Maybe FontStyle
[formatFontVariant] :: Formatting -> Maybe FontVariant
[formatFontWeight] :: Formatting -> Maybe FontWeight
[formatTextDecoration] :: Formatting -> Maybe TextDecoration
[formatVerticalAlign] :: Formatting -> Maybe VerticalAlign
[formatPrefix] :: Formatting -> Maybe Text
[formatSuffix] :: Formatting -> Maybe Text
[formatDisplay] :: Formatting -> Maybe DisplayStyle
[formatTextCase] :: Formatting -> Maybe TextCase
[formatDelimiter] :: Formatting -> Maybe Text
[formatStripPeriods] :: Formatting -> Bool
[formatQuotes] :: Formatting -> Bool
[formatAffixesInside] :: Formatting -> Bool
data FontStyle
NormalFont :: FontStyle
ItalicFont :: FontStyle
ObliqueFont :: FontStyle
data FontVariant
NormalVariant :: FontVariant
SmallCapsVariant :: FontVariant
data FontWeight
NormalWeight :: FontWeight
BoldWeight :: FontWeight
LightWeight :: FontWeight
data TextDecoration
NoDecoration :: TextDecoration
UnderlineDecoration :: TextDecoration
data VerticalAlign
BaselineAlign :: VerticalAlign
SupAlign :: VerticalAlign
SubAlign :: VerticalAlign
data DisplayStyle
DisplayBlock :: DisplayStyle
DisplayLeftMargin :: DisplayStyle
DisplayRightInline :: DisplayStyle
DisplayIndent :: DisplayStyle
data TextCase
Lowercase :: TextCase
Uppercase :: TextCase
CapitalizeFirst :: TextCase
CapitalizeAll :: TextCase
SentenceCase :: TextCase
TitleCase :: TextCase
data DemoteNonDroppingParticle
DemoteDisplayAndSort :: DemoteNonDroppingParticle
DemoteSortOnly :: DemoteNonDroppingParticle
DemoteNever :: DemoteNonDroppingParticle
data StyleOptions
StyleOptions :: Bool -> Maybe Lang -> DemoteNonDroppingParticle -> Bool -> Maybe PageRangeFormat -> Maybe Text -> DisambiguationStrategy -> Maybe Int -> Maybe Text -> Maybe Int -> Maybe Int -> Bool -> Maybe SecondFieldAlign -> Maybe SubsequentAuthorSubstitute -> Bool -> StyleOptions
[styleIsNoteStyle] :: StyleOptions -> Bool
[styleDefaultLocale] :: StyleOptions -> Maybe Lang
[styleDemoteNonDroppingParticle] :: StyleOptions -> DemoteNonDroppingParticle
[styleInitializeWithHyphen] :: StyleOptions -> Bool
[stylePageRangeFormat] :: StyleOptions -> Maybe PageRangeFormat
[stylePageRangeDelimiter] :: StyleOptions -> Maybe Text
[styleDisambiguation] :: StyleOptions -> DisambiguationStrategy
[styleNearNoteDistance] :: StyleOptions -> Maybe Int
[styleCiteGroupDelimiter] :: StyleOptions -> Maybe Text
[styleLineSpacing] :: StyleOptions -> Maybe Int
[styleEntrySpacing] :: StyleOptions -> Maybe Int
[styleHangingIndent] :: StyleOptions -> Bool
[styleSecondFieldAlign] :: StyleOptions -> Maybe SecondFieldAlign
[styleSubsequentAuthorSubstitute] :: StyleOptions -> Maybe SubsequentAuthorSubstitute
[styleUsesYearSuffixVariable] :: StyleOptions -> Bool
data SubsequentAuthorSubstitute
SubsequentAuthorSubstitute :: Text -> SubsequentAuthorSubstituteRule -> SubsequentAuthorSubstitute
data SubsequentAuthorSubstituteRule
CompleteAll :: SubsequentAuthorSubstituteRule
CompleteEach :: SubsequentAuthorSubstituteRule
PartialEach :: SubsequentAuthorSubstituteRule
PartialFirst :: SubsequentAuthorSubstituteRule
data SecondFieldAlign
SecondFieldAlignFlush :: SecondFieldAlign
SecondFieldAlignMargin :: SecondFieldAlign
data PageRangeFormat
PageRangeChicago :: PageRangeFormat
PageRangeExpanded :: PageRangeFormat
PageRangeMinimal :: PageRangeFormat
PageRangeMinimalTwo :: PageRangeFormat
data Style a
Style :: (Int, Int, Int) -> StyleOptions -> Layout a -> Maybe (Layout a) -> [Locale] -> Maybe Abbreviations -> Style a
[styleCslVersion] :: Style a -> (Int, Int, Int)
[styleOptions] :: Style a -> StyleOptions
[styleCitation] :: Style a -> Layout a
[styleBibliography] :: Style a -> Maybe (Layout a)
[styleLocales] :: Style a -> [Locale]
[styleAbbreviations] :: Style a -> Maybe Abbreviations
data TermMatch
LastDigit :: TermMatch
LastTwoDigits :: TermMatch
WholeNumber :: TermMatch
data TermGender
Masculine :: TermGender
Feminine :: TermGender
data TermNumber
Singular :: TermNumber
Plural :: TermNumber
data TermForm
Long :: TermForm
Short :: TermForm
Verb :: TermForm
VerbShort :: TermForm
Symbol :: TermForm
data Term
Term :: Text -> TermForm -> Maybe TermNumber -> Maybe TermGender -> Maybe TermGender -> Maybe TermMatch -> Term
[termName] :: Term -> Text
[termForm] :: Term -> TermForm
[termNumber] :: Term -> Maybe TermNumber
[termGender] :: Term -> Maybe TermGender
[termGenderForm] :: Term -> Maybe TermGender
[termMatch] :: Term -> Maybe TermMatch
emptyTerm :: Term
data SortDirection
Ascending :: SortDirection
Descending :: SortDirection
data SortKey a
SortKeyVariable :: SortDirection -> Variable -> SortKey a
SortKeyMacro :: SortDirection -> [Element a] -> SortKey a
data SortKeyValue
SortKeyValue :: SortDirection -> Maybe [Text] -> SortKeyValue
data LayoutOptions
LayoutOptions :: Maybe Collapsing -> Maybe Text -> Maybe Text -> LayoutOptions
[layoutCollapse] :: LayoutOptions -> Maybe Collapsing
[layoutYearSuffixDelimiter] :: LayoutOptions -> Maybe Text
[layoutAfterCollapseDelimiter] :: LayoutOptions -> Maybe Text
data Collapsing
CollapseCitationNumber :: Collapsing
CollapseYear :: Collapsing
CollapseYearSuffix :: Collapsing
CollapseYearSuffixRanged :: Collapsing
data Layout a
Layout :: LayoutOptions -> Formatting -> [Element a] -> [SortKey a] -> Layout a
[layoutOptions] :: Layout a -> LayoutOptions
[layoutFormatting] :: Layout a -> Formatting
[layoutElements] :: Layout a -> [Element a]
[layoutSortKeys] :: Layout a -> [SortKey a]
data DisambiguationStrategy
DisambiguationStrategy :: Bool -> Maybe GivenNameDisambiguationRule -> Bool -> DisambiguationStrategy
[disambiguateAddNames] :: DisambiguationStrategy -> Bool
[disambiguateAddGivenNames] :: DisambiguationStrategy -> Maybe GivenNameDisambiguationRule
[disambiguateAddYearSuffix] :: DisambiguationStrategy -> Bool
data GivenNameDisambiguationRule
AllNames :: GivenNameDisambiguationRule
AllNamesWithInitials :: GivenNameDisambiguationRule
PrimaryName :: GivenNameDisambiguationRule
PrimaryNameWithInitials :: GivenNameDisambiguationRule
ByCite :: GivenNameDisambiguationRule

-- | Represents a BCP 47 language tag
--   (<a>https://tools.ietf.org/html/bcp47</a>).
data Lang
Lang :: Text -> Maybe Text -> Maybe Text -> [Text] -> [(Text, [(Text, Text)])] -> [Text] -> Lang
[langLanguage] :: Lang -> Text
[langScript] :: Lang -> Maybe Text
[langRegion] :: Lang -> Maybe Text
[langVariants] :: Lang -> [Text]
[langExtensions] :: Lang -> [(Text, [(Text, Text)])]
[langPrivateUse] :: Lang -> [Text]

-- | Parse a BCP 47 language tag as a <a>Lang</a>.
parseLang :: Text -> Either String Lang

-- | Render a <a>Lang</a> in BCP 47 form.
renderLang :: Lang -> Text

-- | Defines locale-specific terms, punctuation styles, and date formats.
data Locale
Locale :: Maybe Lang -> Maybe Bool -> Maybe Bool -> Map DateType (Element Text) -> Map Text [(Term, Text)] -> Locale
[localeLanguage] :: Locale -> Maybe Lang
[localePunctuationInQuote] :: Locale -> Maybe Bool
[localeLimitDayOrdinalsToDay1] :: Locale -> Maybe Bool
[localeDate] :: Locale -> Map DateType (Element Text)
[localeTerms] :: Locale -> Map Text [(Term, Text)]
data DisambiguationData
DisambiguationData :: Maybe Int -> Map Name NameHints -> Maybe Int -> Bool -> DisambiguationData
[disambYearSuffix] :: DisambiguationData -> Maybe Int
[disambNameMap] :: DisambiguationData -> Map Name NameHints
[disambEtAlNames] :: DisambiguationData -> Maybe Int
[disambCondition] :: DisambiguationData -> Bool
data NameHints
AddInitials :: NameHints
AddGivenName :: NameHints
AddInitialsIfPrimary :: NameHints
AddGivenNameIfPrimary :: NameHints

-- | Encodes bibliographic data for a single work.
data Reference a
Reference :: ItemId -> Text -> Maybe DisambiguationData -> Map Variable (Val a) -> Reference a
[referenceId] :: Reference a -> ItemId
[referenceType] :: Reference a -> Text

-- | This is added in processing; if you are constructing a Reference, set
--   to Nothing
[referenceDisambiguation] :: Reference a -> Maybe DisambiguationData
[referenceVariables] :: Reference a -> Map Variable (Val a)
newtype ReferenceMap a
ReferenceMap :: Map ItemId (Reference a) -> ReferenceMap a
[unReferenceMap] :: ReferenceMap a -> Map ItemId (Reference 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.
makeReferenceMap :: [Reference a] -> ([Reference a], ReferenceMap a)
lookupReference :: ItemId -> ReferenceMap a -> Maybe (Reference a)

-- | Value associated with a certain variable in a bibliographic entry.
data Val a

-- | Plain text value
TextVal :: Text -> Val a

-- | Formatted value with parameterized type
FancyVal :: a -> Val a

-- | Numerical value
NumVal :: Int -> Val a

-- | Structured names
NamesVal :: [Name] -> Val a

-- | Structured date
DateVal :: Date -> 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
Formatted :: Formatting -> [Output a] -> Output a
Linked :: Text -> [Output a] -> Output a
InNote :: Output a -> Output a
Literal :: a -> Output a
Tagged :: Tag -> Output a -> Output a
NullOutput :: Output a
data Identifier
IdentDOI :: Text -> Identifier
IdentPMCID :: Text -> Identifier
IdentPMID :: Text -> Identifier
IdentURL :: Text -> Identifier
identifierToURL :: Identifier -> Text
fixShortDOI :: Text -> Text
data Tag
TagTerm :: Term -> Tag
TagCitationNumber :: Int -> Tag
TagCitationLabel :: Tag

-- | marks the title of an entry, so it can be hyperlinked later
TagTitle :: Tag
TagItem :: CitationItemType -> ItemId -> Tag
TagName :: Name -> Tag
TagNames :: Variable -> NamesFormat -> [Name] -> Tag
TagDate :: Date -> Tag
TagYearSuffix :: Int -> Tag
TagLocator :: Tag
TagPrefix :: Tag
TagSuffix :: 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
DateVariable :: VariableType
NameVariable :: VariableType
NumberVariable :: VariableType
StringVariable :: VariableType
UnknownVariable :: VariableType

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

-- | Returns an abbreviation if the variable and its value match something
--   in the abbreviations map.
lookupAbbreviation :: CiteprocOutput a => Variable -> Val a -> Abbreviations -> Maybe (Val a)

-- | Result of citation processing.
data Result a
Result :: [a] -> [(Text, a)] -> [Text] -> Result a

-- | List of formatted citations corresponding to the citations given to
--   <tt>citeproc</tt>
[resultCitations] :: Result a -> [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
[resultBibliography] :: Result a -> [(Text, a)]

-- | Warnings from citation processing
[resultWarnings] :: Result a -> [Text]

-- | Inputs for citation processing.
data Inputs a
Inputs :: Maybe [Citation a] -> Maybe [Reference a] -> Maybe Text -> Maybe Abbreviations -> Maybe Lang -> Inputs a
[inputsCitations] :: Inputs a -> Maybe [Citation a]
[inputsReferences] :: Inputs a -> Maybe [Reference a]
[inputsStyle] :: Inputs a -> Maybe Text
[inputsAbbreviations] :: Inputs a -> Maybe Abbreviations
[inputsLang] :: Inputs a -> Maybe Lang
instance GHC.Classes.Eq Citeproc.Types.CiteprocOptions
instance GHC.Show.Show Citeproc.Types.CiteprocOptions
instance GHC.Classes.Eq Citeproc.Types.CiteprocError
instance GHC.Show.Show Citeproc.Types.CiteprocError
instance Data.Aeson.Types.FromJSON.FromJSON Citeproc.Types.ItemId
instance Data.Aeson.Types.ToJSON.ToJSON Citeproc.Types.ItemId
instance GHC.Base.Monoid Citeproc.Types.ItemId
instance GHC.Base.Semigroup Citeproc.Types.ItemId
instance GHC.Classes.Ord Citeproc.Types.ItemId
instance GHC.Classes.Eq Citeproc.Types.ItemId
instance GHC.Show.Show Citeproc.Types.ItemId
instance GHC.Classes.Ord Citeproc.Types.CitationItemType
instance GHC.Classes.Eq Citeproc.Types.CitationItemType
instance GHC.Show.Show Citeproc.Types.CitationItemType
instance GHC.Classes.Eq Citeproc.Types.Match
instance GHC.Show.Show Citeproc.Types.Match
instance GHC.Classes.Ord Citeproc.Types.Position
instance GHC.Classes.Eq Citeproc.Types.Position
instance GHC.Show.Show Citeproc.Types.Position
instance GHC.Classes.Ord Citeproc.Types.DateType
instance GHC.Classes.Eq Citeproc.Types.DateType
instance GHC.Show.Show Citeproc.Types.DateType
instance GHC.Classes.Eq Citeproc.Types.ShowDateParts
instance GHC.Show.Show Citeproc.Types.ShowDateParts
instance GHC.Classes.Ord Citeproc.Types.DPName
instance GHC.Classes.Eq Citeproc.Types.DPName
instance GHC.Show.Show Citeproc.Types.DPName
instance GHC.Classes.Eq Citeproc.Types.DPForm
instance GHC.Show.Show Citeproc.Types.DPForm
instance GHC.Classes.Eq Citeproc.Types.VariableForm
instance GHC.Show.Show Citeproc.Types.VariableForm
instance GHC.Classes.Eq Citeproc.Types.NumberForm
instance GHC.Show.Show Citeproc.Types.NumberForm
instance GHC.Classes.Eq Citeproc.Types.Pluralize
instance GHC.Show.Show Citeproc.Types.Pluralize
instance GHC.Classes.Eq Citeproc.Types.DelimiterPrecedes
instance GHC.Show.Show Citeproc.Types.DelimiterPrecedes
instance GHC.Classes.Eq Citeproc.Types.NameForm
instance GHC.Show.Show Citeproc.Types.NameForm
instance GHC.Classes.Eq Citeproc.Types.NameAsSortOrder
instance GHC.Show.Show Citeproc.Types.NameAsSortOrder
instance GHC.Classes.Eq Citeproc.Types.TextCase
instance GHC.Show.Show Citeproc.Types.TextCase
instance GHC.Classes.Eq Citeproc.Types.DisplayStyle
instance GHC.Show.Show Citeproc.Types.DisplayStyle
instance GHC.Classes.Eq Citeproc.Types.FontStyle
instance GHC.Show.Show Citeproc.Types.FontStyle
instance GHC.Classes.Eq Citeproc.Types.FontVariant
instance GHC.Show.Show Citeproc.Types.FontVariant
instance GHC.Classes.Eq Citeproc.Types.FontWeight
instance GHC.Show.Show Citeproc.Types.FontWeight
instance GHC.Classes.Eq Citeproc.Types.TextDecoration
instance GHC.Show.Show Citeproc.Types.TextDecoration
instance GHC.Classes.Eq Citeproc.Types.VerticalAlign
instance GHC.Show.Show Citeproc.Types.VerticalAlign
instance GHC.Classes.Eq Citeproc.Types.Formatting
instance GHC.Show.Show Citeproc.Types.Formatting
instance GHC.Classes.Eq Citeproc.Types.DP
instance GHC.Show.Show Citeproc.Types.DP
instance GHC.Classes.Eq Citeproc.Types.SortDirection
instance GHC.Show.Show Citeproc.Types.SortDirection
instance GHC.Classes.Eq Citeproc.Types.SortKeyValue
instance GHC.Show.Show Citeproc.Types.SortKeyValue
instance GHC.Classes.Eq Citeproc.Types.Collapsing
instance GHC.Show.Show Citeproc.Types.Collapsing
instance GHC.Classes.Eq Citeproc.Types.LayoutOptions
instance GHC.Show.Show Citeproc.Types.LayoutOptions
instance GHC.Classes.Ord Citeproc.Types.GivenNameDisambiguationRule
instance GHC.Classes.Eq Citeproc.Types.GivenNameDisambiguationRule
instance GHC.Show.Show Citeproc.Types.GivenNameDisambiguationRule
instance GHC.Classes.Ord Citeproc.Types.DisambiguationStrategy
instance GHC.Classes.Eq Citeproc.Types.DisambiguationStrategy
instance GHC.Show.Show Citeproc.Types.DisambiguationStrategy
instance GHC.Classes.Eq Citeproc.Types.DemoteNonDroppingParticle
instance GHC.Show.Show Citeproc.Types.DemoteNonDroppingParticle
instance GHC.Classes.Eq Citeproc.Types.SubsequentAuthorSubstituteRule
instance GHC.Show.Show Citeproc.Types.SubsequentAuthorSubstituteRule
instance GHC.Classes.Eq Citeproc.Types.SubsequentAuthorSubstitute
instance GHC.Show.Show Citeproc.Types.SubsequentAuthorSubstitute
instance GHC.Classes.Eq Citeproc.Types.SecondFieldAlign
instance GHC.Show.Show Citeproc.Types.SecondFieldAlign
instance GHC.Classes.Ord Citeproc.Types.PageRangeFormat
instance GHC.Classes.Eq Citeproc.Types.PageRangeFormat
instance GHC.Show.Show Citeproc.Types.PageRangeFormat
instance GHC.Classes.Eq Citeproc.Types.StyleOptions
instance GHC.Show.Show Citeproc.Types.StyleOptions
instance GHC.Classes.Eq Citeproc.Types.TermForm
instance GHC.Classes.Ord Citeproc.Types.TermForm
instance GHC.Show.Show Citeproc.Types.TermForm
instance GHC.Classes.Eq Citeproc.Types.NameFormat
instance GHC.Show.Show Citeproc.Types.NameFormat
instance GHC.Classes.Eq Citeproc.Types.NamesFormat
instance GHC.Show.Show Citeproc.Types.NamesFormat
instance GHC.Classes.Eq Citeproc.Types.TermNumber
instance GHC.Classes.Ord Citeproc.Types.TermNumber
instance GHC.Show.Show Citeproc.Types.TermNumber
instance GHC.Classes.Eq Citeproc.Types.TermGender
instance GHC.Classes.Ord Citeproc.Types.TermGender
instance GHC.Show.Show Citeproc.Types.TermGender
instance GHC.Classes.Eq Citeproc.Types.TermMatch
instance GHC.Classes.Ord Citeproc.Types.TermMatch
instance GHC.Show.Show Citeproc.Types.TermMatch
instance GHC.Classes.Eq Citeproc.Types.Term
instance GHC.Show.Show Citeproc.Types.Term
instance Data.String.IsString Citeproc.Types.Variable
instance GHC.Classes.Eq Citeproc.Types.Variable
instance GHC.Classes.Ord Citeproc.Types.Variable
instance GHC.Show.Show Citeproc.Types.Variable
instance GHC.Classes.Eq Citeproc.Types.TextType
instance GHC.Show.Show Citeproc.Types.TextType
instance GHC.Classes.Eq Citeproc.Types.Condition
instance GHC.Show.Show Citeproc.Types.Condition
instance GHC.Classes.Eq (Citeproc.Types.Element a)
instance GHC.Show.Show (Citeproc.Types.Element a)
instance GHC.Classes.Eq (Citeproc.Types.ElementType a)
instance GHC.Show.Show (Citeproc.Types.ElementType a)
instance GHC.Classes.Eq Citeproc.Types.Locale
instance GHC.Show.Show Citeproc.Types.Locale
instance GHC.Classes.Eq (Citeproc.Types.SortKey a)
instance GHC.Show.Show (Citeproc.Types.SortKey a)
instance GHC.Classes.Eq (Citeproc.Types.Layout a)
instance GHC.Show.Show (Citeproc.Types.Layout a)
instance GHC.Classes.Eq Citeproc.Types.NameHints
instance GHC.Classes.Ord Citeproc.Types.NameHints
instance GHC.Show.Show Citeproc.Types.NameHints
instance GHC.Classes.Eq Citeproc.Types.VariableType
instance GHC.Show.Show Citeproc.Types.VariableType
instance GHC.Classes.Ord Citeproc.Types.Name
instance GHC.Classes.Eq Citeproc.Types.Name
instance GHC.Show.Show Citeproc.Types.Name
instance GHC.Classes.Eq Citeproc.Types.DisambiguationData
instance GHC.Classes.Ord Citeproc.Types.DisambiguationData
instance GHC.Show.Show Citeproc.Types.DisambiguationData
instance Data.Aeson.Types.ToJSON.ToJSON Citeproc.Types.DateParts
instance GHC.Classes.Ord Citeproc.Types.DateParts
instance GHC.Classes.Eq Citeproc.Types.DateParts
instance GHC.Show.Show Citeproc.Types.DateParts
instance GHC.Classes.Ord Citeproc.Types.Date
instance GHC.Classes.Eq Citeproc.Types.Date
instance GHC.Show.Show Citeproc.Types.Date
instance Data.Traversable.Traversable Citeproc.Types.Val
instance Data.Foldable.Foldable Citeproc.Types.Val
instance GHC.Base.Functor Citeproc.Types.Val
instance GHC.Classes.Eq a => GHC.Classes.Eq (Citeproc.Types.Val a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Citeproc.Types.Val a)
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Types.Val a)
instance Data.Traversable.Traversable Citeproc.Types.Reference
instance Data.Foldable.Foldable Citeproc.Types.Reference
instance GHC.Base.Functor Citeproc.Types.Reference
instance GHC.Classes.Eq a => GHC.Classes.Eq (Citeproc.Types.Reference a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Citeproc.Types.Reference a)
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Types.Reference a)
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Types.ReferenceMap a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Citeproc.Types.CitationItem a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Citeproc.Types.CitationItem a)
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Types.CitationItem a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Citeproc.Types.Citation a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Citeproc.Types.Citation a)
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Types.Citation a)
instance GHC.Classes.Eq Citeproc.Types.Identifier
instance GHC.Show.Show Citeproc.Types.Identifier
instance GHC.Classes.Eq Citeproc.Types.Tag
instance GHC.Show.Show Citeproc.Types.Tag
instance GHC.Classes.Eq a => GHC.Classes.Eq (Citeproc.Types.Output a)
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Types.Output a)
instance GHC.Classes.Ord Citeproc.Types.Abbreviations
instance GHC.Classes.Eq Citeproc.Types.Abbreviations
instance GHC.Show.Show Citeproc.Types.Abbreviations
instance GHC.Classes.Eq (Citeproc.Types.Style a)
instance GHC.Show.Show (Citeproc.Types.Style a)
instance Data.Foldable.Foldable Citeproc.Types.Result
instance Data.Traversable.Traversable Citeproc.Types.Result
instance GHC.Base.Functor Citeproc.Types.Result
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Types.Result a)
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Types.Inputs a)
instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Citeproc.Types.Inputs a)
instance (Data.Aeson.Types.FromJSON.FromJSON a, GHC.Classes.Eq a) => Data.Aeson.Types.FromJSON.FromJSON (Citeproc.Types.Inputs a)
instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Citeproc.Types.Result a)
instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Citeproc.Types.Result a)
instance Data.Aeson.Types.FromJSON.FromJSON Citeproc.Types.Abbreviations
instance Data.Aeson.Types.ToJSON.ToJSON Citeproc.Types.Abbreviations
instance Data.Generics.Uniplate.Operations.Uniplate (Citeproc.Types.Output a)
instance Data.Generics.Uniplate.Operations.Biplate (Citeproc.Types.Output a) (Citeproc.Types.Output a)
instance (Data.Aeson.Types.FromJSON.FromJSON a, GHC.Classes.Eq a) => Data.Aeson.Types.FromJSON.FromJSON (Citeproc.Types.Citation a)
instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Citeproc.Types.Citation a)
instance (Data.Aeson.Types.FromJSON.FromJSON a, GHC.Classes.Eq a) => Data.Aeson.Types.FromJSON.FromJSON (Citeproc.Types.CitationItem a)
instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Citeproc.Types.CitationItem a)
instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Citeproc.Types.Reference a)
instance (GHC.Classes.Eq a, Data.Aeson.Types.FromJSON.FromJSON a) => Data.Aeson.Types.FromJSON.FromJSON (Citeproc.Types.Reference a)
instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Citeproc.Types.Val a)
instance Data.Aeson.Types.ToJSON.ToJSON Citeproc.Types.Date
instance Data.Aeson.Types.FromJSON.FromJSON Citeproc.Types.Date
instance Data.Aeson.Types.FromJSON.FromJSON Citeproc.Types.DateParts
instance Data.Aeson.Types.ToJSON.ToJSON Citeproc.Types.Name
instance Data.Aeson.Types.FromJSON.FromJSON Citeproc.Types.Name
instance GHC.Base.Semigroup Citeproc.Types.Locale
instance GHC.Base.Monoid Citeproc.Types.Locale
instance GHC.Base.Semigroup Citeproc.Types.Variable
instance GHC.Base.Monoid Citeproc.Types.Variable
instance Data.Aeson.Types.FromJSON.FromJSON Citeproc.Types.Variable
instance Data.Aeson.Types.FromJSON.FromJSONKey Citeproc.Types.Variable
instance Data.Aeson.Types.ToJSON.ToJSON Citeproc.Types.Variable
instance Data.Aeson.Types.ToJSON.ToJSONKey Citeproc.Types.Variable
instance GHC.Classes.Ord Citeproc.Types.Term
instance GHC.Base.Semigroup Citeproc.Types.Formatting
instance GHC.Base.Monoid Citeproc.Types.Formatting
instance Data.Aeson.Types.FromJSON.FromJSON Citeproc.Types.CitationItemType
instance Data.Aeson.Types.ToJSON.ToJSON Citeproc.Types.CitationItemType

module Citeproc.Locale

-- | Parse a CSL locale definition (XML). For information about the format,
--   see
--   <a>https://docs.citationstyles.org/en/stable/translating-locale-files.html</a>.
parseLocale :: Text -> Either CiteprocError Locale

-- | Retrieves the locale defined for the specified language. Implements
--   the locale fallback algorithm described in the CSL 1.0.1 spec.
getLocale :: Lang -> Either CiteprocError Locale

-- | Retrieves the "primary dialect" corresponding to a language, e.g.
--   "lt-LT" for "lt".
getPrimaryDialect :: Lang -> Maybe Lang
lookupQuotes :: Locale -> ((Text, Text), (Text, Text))

module Citeproc.Style

-- | Parse an XML stylesheet into a <a>Style</a>. The first parameter is a
--   function that retrieves the text of the independent parent of a
--   dependent style, given a URL. (This might make an HTTP request or
--   retrieve the style locally.) If you aren't using dependent styles, you
--   may use `(_ -&gt; return mempty)`.
parseStyle :: Monad m => (Text -> m Text) -> Text -> m (Either CiteprocError (Style a))

-- | Merge the locale specified by the first parameter, if any, with the
--   default locale of the style and locale definitions in the style. The
--   locale specified by the first parameter overrides the style's defaults
--   when there is a conflict.
mergeLocales :: Maybe Lang -> Style a -> Locale

module Citeproc.Eval
evalStyle :: CiteprocOutput a => Style a -> Maybe Lang -> [Reference a] -> [Citation a] -> ([Output a], [(Text, Output a)], [Text])
instance GHC.Show.Show Citeproc.Eval.VarCount
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.Eval.EvalState a)
instance GHC.Show.Show Citeproc.Eval.DisambData
instance GHC.Classes.Ord Citeproc.Eval.DisambData
instance GHC.Classes.Eq Citeproc.Eval.DisambData


-- | Process citations using the formatting instructions encoded in a CSL
--   stylesheet. The library targets version 1.0.1 of the CSL spec:
--   <a>https://docs.citationstyles.org/en/stable/specification.html</a>
module Citeproc

-- | Process a list of <a>Citation</a>s, producing formatted citations and
--   a bibliography according to the rules of a CSL <a>Style</a>. If a
--   <a>Lang</a> is specified, override the style's default locale. To
--   obtain a <a>Style</a> from an XML stylesheet, use <a>parseStyle</a>
--   from <a>Citeproc.Style</a>.
citeproc :: CiteprocOutput a => CiteprocOptions -> Style a -> Maybe Lang -> [Reference a] -> [Citation a] -> Result a

-- | Result of citation processing.
data Result a
Result :: [a] -> [(Text, a)] -> [Text] -> Result a

-- | List of formatted citations corresponding to the citations given to
--   <tt>citeproc</tt>
[resultCitations] :: Result a -> [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
[resultBibliography] :: Result a -> [(Text, a)]

-- | Warnings from citation processing
[resultWarnings] :: Result a -> [Text]


-- | Provides functions that facilitate defining textcase transformations.
--   To see how these can be used used, see the definitions of
--   <tt>addTextCase</tt> in <a>Citeproc.Pandoc</a> and
--   <a>Citproc.CslJson</a>.
module Citeproc.CaseTransform

-- | Tracks context in textcase transformations.
data CaseTransformState
Start :: CaseTransformState
StartSentence :: CaseTransformState
AfterWordEnd :: CaseTransformState
AfterWordChar :: CaseTransformState
AfterSentenceEndingPunctuation :: CaseTransformState
BeforeLastWord :: CaseTransformState

-- | Wraps a function used to define textcase transformations.
newtype CaseTransformer
CaseTransformer :: (Maybe Lang -> CaseTransformState -> Text -> Text) -> CaseTransformer
[unCaseTransformer] :: CaseTransformer -> Maybe Lang -> CaseTransformState -> Text -> Text

-- | Uppercase everything.
withUppercaseAll :: CaseTransformer

-- | Lowercase everything.
withLowercaseAll :: CaseTransformer

-- | Capitalize all words.
withCapitalizeWords :: CaseTransformer

-- | Capitalize first letter.
withCapitalizeFirst :: CaseTransformer

-- | Capitalize first letter of each sentence.
withSentenceCase :: CaseTransformer

-- | Use title case.
withTitleCase :: CaseTransformer
instance GHC.Classes.Eq Citeproc.CaseTransform.CaseTransformState
instance GHC.Show.Show Citeproc.CaseTransform.CaseTransformState


-- | This module defines a <a>CiteprocOutput</a> instance for pandoc
--   <a>Inlines</a>.
module Citeproc.Pandoc
instance Citeproc.Types.CiteprocOutput Text.Pandoc.Builder.Inlines


-- | CSL JSON is the structured text format defined in
--   <a>https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html</a>.
--   It is used to represent formatted text inside CSL JSON bibliographies.
--   For the most part it is a subset of HTML, with some special features
--   like smart quote parsing. This module defines a parser and a renderer
--   for this format, as well as <a>CiteprocOutput</a> and other typeclass
--   instances.
module Citeproc.CslJson
data CslJson a
CslText :: a -> CslJson a
CslEmpty :: CslJson a
CslConcat :: CslJson a -> CslJson a -> CslJson a
CslQuoted :: CslJson a -> CslJson a
CslItalic :: CslJson a -> CslJson a
CslNormal :: CslJson a -> CslJson a
CslBold :: CslJson a -> CslJson a
CslUnderline :: CslJson a -> CslJson a
CslNoDecoration :: CslJson a -> CslJson a
CslSmallCaps :: CslJson a -> CslJson a
CslBaseline :: CslJson a -> CslJson a
CslSup :: CslJson a -> CslJson a
CslSub :: CslJson a -> CslJson a
CslNoCase :: CslJson a -> CslJson a
CslDiv :: Text -> CslJson a -> CslJson a
CslLink :: Text -> CslJson a -> CslJson a
cslJsonToJson :: CslJson Text -> [Value]

-- | Render <a>CslJson</a> as <a>Text</a>. Set the first parameter to True
--   when rendering HTML output (so that entities are escaped). Set it to
--   False when rendering for CSL JSON bibliographies.
renderCslJson :: Bool -> Locale -> CslJson Text -> Text
parseCslJson :: Locale -> Text -> CslJson Text
instance Data.Traversable.Traversable Citeproc.CslJson.CslJson
instance Data.Foldable.Foldable Citeproc.CslJson.CslJson
instance GHC.Base.Functor Citeproc.CslJson.CslJson
instance GHC.Classes.Ord a => GHC.Classes.Ord (Citeproc.CslJson.CslJson a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Citeproc.CslJson.CslJson a)
instance GHC.Show.Show a => GHC.Show.Show (Citeproc.CslJson.CslJson a)
instance GHC.Classes.Eq Citeproc.CslJson.RenderContext
instance GHC.Show.Show Citeproc.CslJson.RenderContext
instance GHC.Base.Semigroup (Citeproc.CslJson.CslJson a)
instance GHC.Base.Monoid (Citeproc.CslJson.CslJson a)
instance Data.Aeson.Types.FromJSON.FromJSON (Citeproc.CslJson.CslJson Data.Text.Internal.Text)
instance Data.Aeson.Types.ToJSON.ToJSON (Citeproc.CslJson.CslJson Data.Text.Internal.Text)
instance Data.Generics.Uniplate.Operations.Uniplate (Citeproc.CslJson.CslJson a)
instance Data.Generics.Uniplate.Operations.Biplate (Citeproc.CslJson.CslJson a) (Citeproc.CslJson.CslJson a)
instance Citeproc.Types.CiteprocOutput (Citeproc.CslJson.CslJson Data.Text.Internal.Text)
