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


-- | Supports using pandoc with citeproc
--   
--   The pandoc-citeproc library exports functions for using the citeproc
--   system with pandoc. It relies on citeproc-hs, a library for rendering
--   bibliographic reference citations into a variety of styles using a
--   macro language called Citation Style Language (CSL). More details on
--   CSL can be found here: <a>http://citationstyles.org/</a>.
--   
--   Currently this package includes a heavily revised copy of the
--   citeproc-hs code. When citeproc-hs is updated to be compatible, this
--   package will simply depend on citeproc-hs.
--   
--   This package also contains an executable: pandoc-citeproc, which works
--   as a pandoc filter, and also has a mode for converting bibliographic
--   databases a YAML format suitable for inclusion in pandoc YAML
--   metadata.
@package pandoc-citeproc
@version 0.10.5.1


-- | The Style types
module Text.CSL.Style
readCSLString :: String -> [Inline]
writeCSLString :: [Inline] -> String
newtype Formatted
Formatted :: [Inline] -> Formatted
[unFormatted] :: Formatted -> [Inline]

-- | The representation of a parsed CSL style.
data Style
Style :: String -> String -> Maybe CSInfo -> String -> [Locale] -> Abbreviations -> [Option] -> [MacroMap] -> Citation -> Maybe Bibliography -> Style
[styleVersion] :: Style -> String
[styleClass] :: Style -> String
[styleInfo] :: Style -> Maybe CSInfo
[styleDefaultLocale] :: Style -> String
[styleLocale] :: Style -> [Locale]
[styleAbbrevs] :: Style -> Abbreviations
[csOptions] :: Style -> [Option]
[csMacros] :: Style -> [MacroMap]
[citation] :: Style -> Citation
[biblio] :: Style -> Maybe Bibliography
data Locale
Locale :: String -> String -> [Option] -> [CslTerm] -> [Element] -> Locale
[localeVersion] :: Locale -> String
[localeLang] :: Locale -> String
[localeOptions] :: Locale -> [Option]
[localeTerms] :: Locale -> [CslTerm]
[localeDate] :: Locale -> [Element]

-- | With the <tt>defaultLocale</tt>, the locales-xx-XX.xml loaded file and
--   the parsed <a>Style</a> cs:locale elements, produce the final
--   <a>Locale</a> as the only element of a list, taking into account CSL
--   locale prioritization.
mergeLocales :: String -> Locale -> [Locale] -> [Locale]
data CslTerm
CT :: String -> Form -> Gender -> Gender -> String -> String -> String -> CslTerm
[cslTerm] :: CslTerm -> String
[termForm] :: CslTerm -> Form
[termGender] :: CslTerm -> Gender
[termGenderForm] :: CslTerm -> Gender
[termSingular] :: CslTerm -> String
[termPlural] :: CslTerm -> String
[termMatch] :: CslTerm -> String
newTerm :: CslTerm
findTerm :: String -> Form -> [CslTerm] -> Maybe CslTerm
findTerm' :: String -> Form -> Gender -> [CslTerm] -> Maybe CslTerm
newtype Abbreviations
Abbreviations :: Map String (Map String (Map String String)) -> Abbreviations
[unAbbreviations] :: Abbreviations -> Map String (Map String (Map String String))
type MacroMap = (String, [Element])
data Citation
Citation :: [Option] -> [Sort] -> Layout -> Citation
[citOptions] :: Citation -> [Option]
[citSort] :: Citation -> [Sort]
[citLayout] :: Citation -> Layout
data Bibliography
Bibliography :: [Option] -> [Sort] -> Layout -> Bibliography
[bibOptions] :: Bibliography -> [Option]
[bibSort] :: Bibliography -> [Sort]
[bibLayout] :: Bibliography -> Layout
type Option = (String, String)
mergeOptions :: [Option] -> [Option] -> [Option]
data Layout
Layout :: Formatting -> Delimiter -> [Element] -> Layout
[layFormat] :: Layout -> Formatting
[layDelim] :: Layout -> Delimiter
[elements] :: Layout -> [Element]
data Element
Choose :: IfThen -> [IfThen] -> [Element] -> Element
Macro :: String -> Formatting -> Element
Const :: String -> Formatting -> Element
Variable :: [String] -> Form -> Formatting -> Delimiter -> Element
Term :: String -> Form -> Formatting -> Bool -> Element
Label :: String -> Form -> Formatting -> Plural -> Element
Number :: String -> NumericForm -> Formatting -> Element
Names :: [String] -> [Name] -> Formatting -> Delimiter -> [Element] -> Element
Substitute :: [Element] -> Element
Group :: Formatting -> Delimiter -> [Element] -> Element
Date :: [String] -> DateForm -> Formatting -> Delimiter -> [DatePart] -> String -> Element
data IfThen
IfThen :: Condition -> Match -> [Element] -> IfThen
data Condition
Condition :: [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> Condition
[isType] :: Condition -> [String]
[isSet] :: Condition -> [String]
[isNumeric] :: Condition -> [String]
[isUncertainDate] :: Condition -> [String]
[isPosition] :: Condition -> [String]
[disambiguation] :: Condition -> [String]
[isLocator] :: Condition -> [String]
type Delimiter = String
data Match
Any :: Match
All :: Match
None :: Match
match :: Match -> [Bool] -> Bool
data DatePart
DatePart :: String -> String -> String -> Formatting -> DatePart
[dpName] :: DatePart -> String
[dpForm] :: DatePart -> String
[dpRangeDelim] :: DatePart -> String
[dpFormatting] :: DatePart -> Formatting
defaultDate :: [DatePart]
data Sort
SortVariable :: String -> Sorting -> Sort
SortMacro :: String -> Sorting -> Int -> Int -> String -> Sort
data Sorting
Ascending :: String -> Sorting
Descending :: String -> Sorting
compare' :: String -> String -> Ordering
data Form
Long :: Form
Short :: Form
Count :: Form
Verb :: Form
VerbShort :: Form
Symbol :: Form
NotSet :: Form
data Gender
Feminine :: Gender
Masculine :: Gender
Neuter :: Gender
data NumericForm
Numeric :: NumericForm
Ordinal :: NumericForm
Roman :: NumericForm
LongOrdinal :: NumericForm
data DateForm
TextDate :: DateForm
NumericDate :: DateForm
NoFormDate :: DateForm
data Plural
Contextual :: Plural
Always :: Plural
Never :: Plural
data Name
Name :: Form -> Formatting -> NameAttrs -> Delimiter -> [NamePart] -> Name
NameLabel :: Form -> Formatting -> Plural -> Name
EtAl :: Formatting -> String -> Name
type NameAttrs = [(String, String)]
data NamePart
NamePart :: String -> Formatting -> NamePart
isPlural :: Plural -> Int -> Bool
isName :: Name -> Bool
isNames :: Element -> Bool
hasEtAl :: [Name] -> Bool
data Formatting
Formatting :: String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> Quote -> Bool -> Bool -> Bool -> String -> Formatting
[prefix] :: Formatting -> String
[suffix] :: Formatting -> String
[fontFamily] :: Formatting -> String
[fontStyle] :: Formatting -> String
[fontVariant] :: Formatting -> String
[fontWeight] :: Formatting -> String
[textDecoration] :: Formatting -> String
[verticalAlign] :: Formatting -> String
[textCase] :: Formatting -> String
[display] :: Formatting -> String
[quotes] :: Formatting -> Quote
[stripPeriods] :: Formatting -> Bool
[noCase] :: Formatting -> Bool
[noDecor] :: Formatting -> Bool
[hyperlink] :: Formatting -> String
emptyFormatting :: Formatting
rmTitleCase :: Formatting -> Formatting
data Quote
NativeQuote :: Quote
ParsedQuote :: Quote
NoQuote :: Quote
mergeFM :: Formatting -> Formatting -> Formatting
data CSInfo
CSInfo :: String -> CSAuthor -> [CSCategory] -> String -> String -> CSInfo
[csiTitle] :: CSInfo -> String
[csiAuthor] :: CSInfo -> CSAuthor
[csiCategories] :: CSInfo -> [CSCategory]
[csiId] :: CSInfo -> String
[csiUpdated] :: CSInfo -> String
data CSAuthor
CSAuthor :: String -> String -> String -> CSAuthor
data CSCategory
CSCategory :: String -> String -> String -> CSCategory
data CiteprocError
NoOutput :: CiteprocError
ReferenceNotFound :: String -> CiteprocError

-- | The <a>Output</a> generated by the evaluation of a style. Must be
--   further processed for disambiguation and collapsing.
data Output
ONull :: Output
OSpace :: Output
OPan :: [Inline] -> Output

-- | A delimiter string.
ODel :: String -> Output

-- | A simple <a>String</a>
OStr :: String -> Formatting -> Output

-- | Warning message
OErr :: CiteprocError -> Output

-- | A label used for roles
OLabel :: String -> Formatting -> Output

-- | A number (used to count contributors)
ONum :: Int -> Formatting -> Output

-- | The citation number
OCitNum :: Int -> Formatting -> Output

-- | The citation label
OCitLabel :: String -> Formatting -> Output

-- | A (possibly) ranged date
ODate :: [Output] -> Output

-- | The year and the citeId
OYear :: String -> String -> Formatting -> Output

-- | The year suffix, the citeId and a holder for collision data
OYearSuf :: String -> String -> [Output] -> Formatting -> Output

-- | A (family) name with the list of given names.
OName :: Agent -> [Output] -> [[Output]] -> Formatting -> Output

-- | The citation key, the role (author, editor, etc.), the contributor(s),
--   the output needed for year suf. disambiguation, and everything used
--   for name disambiguation.
OContrib :: String -> String -> [Output] -> [Output] -> [[Output]] -> Output

-- | The citation's locator
OLoc :: [Output] -> Formatting -> Output

-- | Some nested <a>Output</a>
Output :: [Output] -> Formatting -> Output
type Citations = [[Cite]]
data Cite
Cite :: String -> Formatted -> Formatted -> String -> String -> String -> String -> Bool -> Bool -> Bool -> Int -> Cite
[citeId] :: Cite -> String
[citePrefix] :: Cite -> Formatted
[citeSuffix] :: Cite -> Formatted
[citeLabel] :: Cite -> String
[citeLocator] :: Cite -> String
[citeNoteNumber] :: Cite -> String
[citePosition] :: Cite -> String
[nearNote] :: Cite -> Bool
[authorInText] :: Cite -> Bool
[suppressAuthor] :: Cite -> Bool
[citeHash] :: Cite -> Int
emptyCite :: Cite

-- | A citation group: the first list has a single member when the citation
--   group starts with an "author-in-text" cite, the <a>Formatting</a> to
--   be applied, the <a>Delimiter</a> between individual citations and the
--   list of evaluated citations.
data CitationGroup
CG :: [(Cite, Output)] -> Formatting -> Delimiter -> [(Cite, Output)] -> CitationGroup
data BiblioData
BD :: [Formatted] -> [Formatted] -> [String] -> BiblioData
[citations] :: BiblioData -> [Formatted]
[bibliography] :: BiblioData -> [Formatted]
[citationIds] :: BiblioData -> [String]

-- | A record with all the data to produce the <a>Formatted</a> of a
--   citation: the citation key, the part of the formatted citation that
--   may be colliding with other citations, the form of the citation when a
--   year suffix is used for disambiguation , the data to disambiguate it
--   (all possible contributors and all possible given names), and, after
--   processing, the disambiguated citation and its year, initially empty.
data CiteData
CD :: String -> [Output] -> [Output] -> [[Output]] -> [Output] -> [String] -> String -> CiteData
[key] :: CiteData -> String
[collision] :: CiteData -> [Output]
[disambYS] :: CiteData -> [Output]
[disambData] :: CiteData -> [[Output]]
[disambed] :: CiteData -> [Output]
[sameAs] :: CiteData -> [String]
[citYear] :: CiteData -> String
data NameData
ND :: Agent -> [Output] -> [[Output]] -> [Output] -> NameData
[nameKey] :: NameData -> Agent
[nameCollision] :: NameData -> [Output]
[nameDisambData] :: NameData -> [[Output]]
[nameDataSolved] :: NameData -> [Output]
isPunctuationInQuote :: Style -> Bool
object' :: [Pair] -> Value
data Agent
Agent :: [Formatted] -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Bool -> Bool -> Agent
[givenName] :: Agent -> [Formatted]
[droppingPart] :: Agent -> Formatted
[nonDroppingPart] :: Agent -> Formatted
[familyName] :: Agent -> Formatted
[nameSuffix] :: Agent -> Formatted
[literal] :: Agent -> Formatted
[commaSuffix] :: Agent -> Bool
[parseNames] :: Agent -> Bool
emptyAgent :: Agent
instance GHC.Generics.Generic Text.CSL.Style.CitationGroup
instance Data.Data.Data Text.CSL.Style.CitationGroup
instance GHC.Classes.Eq Text.CSL.Style.CitationGroup
instance GHC.Show.Show Text.CSL.Style.CitationGroup
instance GHC.Generics.Generic Text.CSL.Style.CiteData
instance Data.Data.Data Text.CSL.Style.CiteData
instance GHC.Show.Show Text.CSL.Style.CiteData
instance GHC.Generics.Generic Text.CSL.Style.NameData
instance Data.Data.Data Text.CSL.Style.NameData
instance GHC.Show.Show Text.CSL.Style.NameData
instance GHC.Generics.Generic Text.CSL.Style.Output
instance Data.Data.Data Text.CSL.Style.Output
instance GHC.Show.Show Text.CSL.Style.Output
instance GHC.Classes.Ord Text.CSL.Style.Output
instance GHC.Classes.Eq Text.CSL.Style.Output
instance GHC.Generics.Generic Text.CSL.Style.Agent
instance Data.Data.Data Text.CSL.Style.Agent
instance GHC.Classes.Ord Text.CSL.Style.Agent
instance GHC.Classes.Eq Text.CSL.Style.Agent
instance GHC.Read.Read Text.CSL.Style.Agent
instance GHC.Show.Show Text.CSL.Style.Agent
instance GHC.Generics.Generic Text.CSL.Style.BiblioData
instance Data.Data.Data Text.CSL.Style.BiblioData
instance GHC.Show.Show Text.CSL.Style.BiblioData
instance GHC.Generics.Generic Text.CSL.Style.Cite
instance Data.Data.Data Text.CSL.Style.Cite
instance GHC.Classes.Eq Text.CSL.Style.Cite
instance GHC.Show.Show Text.CSL.Style.Cite
instance GHC.Generics.Generic Text.CSL.Style.CiteprocError
instance Data.Data.Data Text.CSL.Style.CiteprocError
instance GHC.Show.Show Text.CSL.Style.CiteprocError
instance GHC.Classes.Ord Text.CSL.Style.CiteprocError
instance GHC.Classes.Eq Text.CSL.Style.CiteprocError
instance GHC.Generics.Generic Text.CSL.Style.Style
instance Data.Data.Data Text.CSL.Style.Style
instance GHC.Read.Read Text.CSL.Style.Style
instance GHC.Show.Show Text.CSL.Style.Style
instance GHC.Generics.Generic Text.CSL.Style.CSInfo
instance Data.Data.Data Text.CSL.Style.CSInfo
instance GHC.Read.Read Text.CSL.Style.CSInfo
instance GHC.Show.Show Text.CSL.Style.CSInfo
instance GHC.Generics.Generic Text.CSL.Style.CSCategory
instance Data.Data.Data Text.CSL.Style.CSCategory
instance GHC.Classes.Eq Text.CSL.Style.CSCategory
instance GHC.Read.Read Text.CSL.Style.CSCategory
instance GHC.Show.Show Text.CSL.Style.CSCategory
instance GHC.Generics.Generic Text.CSL.Style.CSAuthor
instance Data.Data.Data Text.CSL.Style.CSAuthor
instance GHC.Classes.Eq Text.CSL.Style.CSAuthor
instance GHC.Read.Read Text.CSL.Style.CSAuthor
instance GHC.Show.Show Text.CSL.Style.CSAuthor
instance GHC.Generics.Generic Text.CSL.Style.Citation
instance Data.Data.Data Text.CSL.Style.Citation
instance GHC.Read.Read Text.CSL.Style.Citation
instance GHC.Show.Show Text.CSL.Style.Citation
instance GHC.Generics.Generic Text.CSL.Style.Bibliography
instance Data.Data.Data Text.CSL.Style.Bibliography
instance GHC.Read.Read Text.CSL.Style.Bibliography
instance GHC.Show.Show Text.CSL.Style.Bibliography
instance GHC.Generics.Generic Text.CSL.Style.Layout
instance Data.Data.Data Text.CSL.Style.Layout
instance GHC.Read.Read Text.CSL.Style.Layout
instance GHC.Show.Show Text.CSL.Style.Layout
instance GHC.Generics.Generic Text.CSL.Style.Locale
instance Data.Data.Data Text.CSL.Style.Locale
instance GHC.Classes.Eq Text.CSL.Style.Locale
instance GHC.Read.Read Text.CSL.Style.Locale
instance GHC.Show.Show Text.CSL.Style.Locale
instance GHC.Generics.Generic Text.CSL.Style.IfThen
instance Data.Data.Data Text.CSL.Style.IfThen
instance GHC.Read.Read Text.CSL.Style.IfThen
instance GHC.Show.Show Text.CSL.Style.IfThen
instance GHC.Classes.Eq Text.CSL.Style.IfThen
instance GHC.Generics.Generic Text.CSL.Style.Element
instance Data.Data.Data Text.CSL.Style.Element
instance GHC.Classes.Eq Text.CSL.Style.Element
instance GHC.Read.Read Text.CSL.Style.Element
instance GHC.Show.Show Text.CSL.Style.Element
instance GHC.Generics.Generic Text.CSL.Style.DatePart
instance Data.Data.Data Text.CSL.Style.DatePart
instance GHC.Classes.Eq Text.CSL.Style.DatePart
instance GHC.Read.Read Text.CSL.Style.DatePart
instance GHC.Show.Show Text.CSL.Style.DatePart
instance GHC.Generics.Generic Text.CSL.Style.Name
instance Data.Data.Data Text.CSL.Style.Name
instance GHC.Read.Read Text.CSL.Style.Name
instance GHC.Show.Show Text.CSL.Style.Name
instance GHC.Classes.Eq Text.CSL.Style.Name
instance GHC.Generics.Generic Text.CSL.Style.NamePart
instance Data.Data.Data Text.CSL.Style.NamePart
instance GHC.Classes.Eq Text.CSL.Style.NamePart
instance GHC.Read.Read Text.CSL.Style.NamePart
instance GHC.Show.Show Text.CSL.Style.NamePart
instance GHC.Generics.Generic Text.CSL.Style.Formatting
instance Data.Data.Data Text.CSL.Style.Formatting
instance GHC.Classes.Ord Text.CSL.Style.Formatting
instance GHC.Classes.Eq Text.CSL.Style.Formatting
instance GHC.Read.Read Text.CSL.Style.Formatting
instance GHC.Generics.Generic Text.CSL.Style.Quote
instance Data.Data.Data Text.CSL.Style.Quote
instance GHC.Classes.Ord Text.CSL.Style.Quote
instance GHC.Classes.Eq Text.CSL.Style.Quote
instance GHC.Read.Read Text.CSL.Style.Quote
instance GHC.Show.Show Text.CSL.Style.Quote
instance GHC.Generics.Generic Text.CSL.Style.Plural
instance Data.Data.Data Text.CSL.Style.Plural
instance GHC.Read.Read Text.CSL.Style.Plural
instance GHC.Show.Show Text.CSL.Style.Plural
instance GHC.Classes.Eq Text.CSL.Style.Plural
instance GHC.Generics.Generic Text.CSL.Style.DateForm
instance Data.Data.Data Text.CSL.Style.DateForm
instance GHC.Read.Read Text.CSL.Style.DateForm
instance GHC.Show.Show Text.CSL.Style.DateForm
instance GHC.Classes.Eq Text.CSL.Style.DateForm
instance GHC.Generics.Generic Text.CSL.Style.NumericForm
instance Data.Data.Data Text.CSL.Style.NumericForm
instance GHC.Read.Read Text.CSL.Style.NumericForm
instance GHC.Show.Show Text.CSL.Style.NumericForm
instance GHC.Classes.Eq Text.CSL.Style.NumericForm
instance GHC.Generics.Generic Text.CSL.Style.CslTerm
instance Data.Data.Data Text.CSL.Style.CslTerm
instance GHC.Classes.Eq Text.CSL.Style.CslTerm
instance GHC.Read.Read Text.CSL.Style.CslTerm
instance GHC.Show.Show Text.CSL.Style.CslTerm
instance GHC.Generics.Generic Text.CSL.Style.Gender
instance Data.Data.Data Text.CSL.Style.Gender
instance GHC.Read.Read Text.CSL.Style.Gender
instance GHC.Show.Show Text.CSL.Style.Gender
instance GHC.Classes.Eq Text.CSL.Style.Gender
instance GHC.Generics.Generic Text.CSL.Style.Form
instance Data.Data.Data Text.CSL.Style.Form
instance GHC.Read.Read Text.CSL.Style.Form
instance GHC.Show.Show Text.CSL.Style.Form
instance GHC.Classes.Eq Text.CSL.Style.Form
instance GHC.Generics.Generic Text.CSL.Style.Sort
instance Data.Data.Data Text.CSL.Style.Sort
instance GHC.Read.Read Text.CSL.Style.Sort
instance GHC.Show.Show Text.CSL.Style.Sort
instance GHC.Classes.Eq Text.CSL.Style.Sort
instance GHC.Generics.Generic Text.CSL.Style.Sorting
instance Data.Data.Data Text.CSL.Style.Sorting
instance GHC.Classes.Eq Text.CSL.Style.Sorting
instance GHC.Show.Show Text.CSL.Style.Sorting
instance GHC.Read.Read Text.CSL.Style.Sorting
instance GHC.Generics.Generic Text.CSL.Style.Match
instance Data.Data.Data Text.CSL.Style.Match
instance GHC.Classes.Eq Text.CSL.Style.Match
instance GHC.Read.Read Text.CSL.Style.Match
instance GHC.Show.Show Text.CSL.Style.Match
instance GHC.Generics.Generic Text.CSL.Style.Condition
instance Data.Data.Data Text.CSL.Style.Condition
instance GHC.Read.Read Text.CSL.Style.Condition
instance GHC.Show.Show Text.CSL.Style.Condition
instance GHC.Classes.Eq Text.CSL.Style.Condition
instance GHC.Generics.Generic Text.CSL.Style.Abbreviations
instance Data.Data.Data Text.CSL.Style.Abbreviations
instance GHC.Read.Read Text.CSL.Style.Abbreviations
instance GHC.Show.Show Text.CSL.Style.Abbreviations
instance GHC.Generics.Generic Text.CSL.Style.Formatted
instance Data.Data.Data Text.CSL.Style.Formatted
instance GHC.Classes.Ord Text.CSL.Style.Formatted
instance GHC.Classes.Eq Text.CSL.Style.Formatted
instance GHC.Read.Read Text.CSL.Style.Formatted
instance GHC.Show.Show Text.CSL.Style.Formatted
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Style.Formatted
instance Data.Aeson.Types.ToJSON.ToJSON Text.CSL.Style.Formatted
instance Data.Yaml.Builder.ToYaml Text.CSL.Style.Formatted
instance Data.String.IsString Text.CSL.Style.Formatted
instance GHC.Base.Monoid Text.CSL.Style.Formatted
instance Text.Pandoc.Walk.Walkable Text.Pandoc.Definition.Inline Text.CSL.Style.Formatted
instance Text.Pandoc.Walk.Walkable Text.CSL.Style.Formatted Text.CSL.Style.Formatted
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Style.Abbreviations
instance GHC.Classes.Ord Text.CSL.Style.Sorting
instance GHC.Show.Show Text.CSL.Style.Formatting
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Style.Cite
instance Data.Aeson.Types.FromJSON.FromJSON [[Text.CSL.Style.Cite]]
instance GHC.Classes.Eq Text.CSL.Style.CiteData
instance GHC.Classes.Eq Text.CSL.Style.NameData
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Style.Agent
instance Data.Yaml.Builder.ToYaml Text.CSL.Style.Agent
instance Data.Aeson.Types.ToJSON.ToJSON Text.CSL.Style.Agent
instance Data.Aeson.Types.FromJSON.FromJSON [Text.CSL.Style.Agent]


-- | The pandoc output formatter for CSL
module Text.CSL.Output.Pandoc
renderPandoc :: Style -> Formatted -> [Inline]
renderPandoc' :: Style -> (Formatted, String) -> Block
headInline :: [Inline] -> String
initInline :: [Inline] -> [Inline]
lastInline :: [Inline] -> String
tailInline :: [Inline] -> [Inline]
tailFirstInlineStr :: [Inline] -> [Inline]
toCapital :: [Inline] -> [Inline]


-- | The CSL implementation
module Text.CSL.Eval.Output
formatString :: String -> Formatted
pAffix :: Parsec String () [Inline]
pRaw :: Parsec String () Inline
pString :: Parsec String () Inline
pSpace :: Parsec String () Inline
output :: Formatting -> String -> [Output]
appendOutput :: Formatting -> [Output] -> [Output]
outputList :: Formatting -> Delimiter -> [Output] -> [Output]
cleanOutput :: [Output] -> [Output]
rmEmptyOutput :: Output -> Maybe Output
addDelim :: String -> [Output] -> [Output]
noOutputError :: Output
noBibDataError :: Cite -> Output
oStr :: String -> [Output]
oStr' :: String -> Formatting -> [Output]
oPan :: [Inline] -> [Output]
oPan' :: [Inline] -> Formatting -> [Output]
formatOutputList :: [Output] -> Formatted

-- | Convert evaluated <a>Output</a> into <a>Formatted</a>, ready for the
--   output filters.
formatOutput :: Output -> Formatted
addFormatting :: Formatting -> Formatted -> Formatted


-- | The plain ascii output formatter for CSL
module Text.CSL.Output.Plain

-- | Render the <a>Formatted</a> into a plain text string.
renderPlain :: Formatted -> String


-- | The Reference type
module Text.CSL.Reference
newtype Literal
Literal :: String -> Literal
[unLiteral] :: Literal -> String

-- | An existential type to wrap the different types a <a>Reference</a> is
--   made of. This way we can create a map to make queries easier.
data Value
Value :: a -> Value
type ReferenceMap = [(String, Value)]
mkRefMap :: Maybe Reference -> ReferenceMap
fromValue :: Data a => Value -> Maybe a
isValueSet :: Value -> Bool
data Empty
Empty :: Empty
data RefDate
RefDate :: Literal -> Literal -> Literal -> Literal -> Literal -> Bool -> RefDate
[year] :: RefDate -> Literal
[month] :: RefDate -> Literal
[season] :: RefDate -> Literal
[day] :: RefDate -> Literal
[other] :: RefDate -> Literal
[circa] :: RefDate -> Bool
handleLiteral :: RefDate -> [RefDate]
toDatePart :: RefDate -> [Int]
setCirca :: Bool -> RefDate -> RefDate
mkRefDate :: Literal -> Parser [RefDate]
data RefType
NoType :: RefType
Article :: RefType
ArticleMagazine :: RefType
ArticleNewspaper :: RefType
ArticleJournal :: RefType
Bill :: RefType
Book :: RefType
Broadcast :: RefType
Chapter :: RefType
Dataset :: RefType
Entry :: RefType
EntryDictionary :: RefType
EntryEncyclopedia :: RefType
Figure :: RefType
Graphic :: RefType
Interview :: RefType
Legislation :: RefType
LegalCase :: RefType
Manuscript :: RefType
Map :: RefType
MotionPicture :: RefType
MusicalScore :: RefType
Pamphlet :: RefType
PaperConference :: RefType
Patent :: RefType
Post :: RefType
PostWeblog :: RefType
PersonalCommunication :: RefType
Report :: RefType
Review :: RefType
ReviewBook :: RefType
Song :: RefType
Speech :: RefType
Thesis :: RefType
Treaty :: RefType
Webpage :: RefType
newtype CNum
CNum :: Int -> CNum
[unCNum] :: CNum -> Int
newtype CLabel
CLabel :: String -> CLabel
[unCLabel] :: CLabel -> String

-- | The <a>Reference</a> record.
data Reference
Reference :: Literal -> RefType -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [RefDate] -> [RefDate] -> [RefDate] -> [RefDate] -> [RefDate] -> [RefDate] -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Literal -> Literal -> Literal -> Literal -> Literal -> Literal -> Literal -> Literal -> Literal -> [Literal] -> Literal -> CNum -> Int -> CLabel -> Reference
[refId] :: Reference -> Literal
[refType] :: Reference -> RefType
[author] :: Reference -> [Agent]
[editor] :: Reference -> [Agent]
[translator] :: Reference -> [Agent]
[recipient] :: Reference -> [Agent]
[interviewer] :: Reference -> [Agent]
[composer] :: Reference -> [Agent]
[director] :: Reference -> [Agent]
[illustrator] :: Reference -> [Agent]
[originalAuthor] :: Reference -> [Agent]
[containerAuthor] :: Reference -> [Agent]
[collectionEditor] :: Reference -> [Agent]
[editorialDirector] :: Reference -> [Agent]
[reviewedAuthor] :: Reference -> [Agent]
[issued] :: Reference -> [RefDate]
[eventDate] :: Reference -> [RefDate]
[accessed] :: Reference -> [RefDate]
[container] :: Reference -> [RefDate]
[originalDate] :: Reference -> [RefDate]
[submitted] :: Reference -> [RefDate]
[title] :: Reference -> Formatted
[titleShort] :: Reference -> Formatted
[reviewedTitle] :: Reference -> Formatted
[containerTitle] :: Reference -> Formatted
[volumeTitle] :: Reference -> Formatted
[collectionTitle] :: Reference -> Formatted
[containerTitleShort] :: Reference -> Formatted
[collectionNumber] :: Reference -> Formatted
[originalTitle] :: Reference -> Formatted
[publisher] :: Reference -> Formatted
[originalPublisher] :: Reference -> Formatted
[publisherPlace] :: Reference -> Formatted
[originalPublisherPlace] :: Reference -> Formatted
[authority] :: Reference -> Formatted
[jurisdiction] :: Reference -> Formatted
[archive] :: Reference -> Formatted
[archivePlace] :: Reference -> Formatted
[archiveLocation] :: Reference -> Formatted
[event] :: Reference -> Formatted
[eventPlace] :: Reference -> Formatted
[page] :: Reference -> Formatted
[pageFirst] :: Reference -> Formatted
[numberOfPages] :: Reference -> Formatted
[version] :: Reference -> Formatted
[volume] :: Reference -> Formatted
[numberOfVolumes] :: Reference -> Formatted
[issue] :: Reference -> Formatted
[chapterNumber] :: Reference -> Formatted
[medium] :: Reference -> Formatted
[status] :: Reference -> Formatted
[edition] :: Reference -> Formatted
[section] :: Reference -> Formatted
[source] :: Reference -> Formatted
[genre] :: Reference -> Formatted
[note] :: Reference -> Formatted
[annote] :: Reference -> Formatted
[abstract] :: Reference -> Formatted
[keyword] :: Reference -> Formatted
[number] :: Reference -> Formatted
[references] :: Reference -> Formatted
[url] :: Reference -> Literal
[doi] :: Reference -> Literal
[isbn] :: Reference -> Literal
[issn] :: Reference -> Literal
[pmcid] :: Reference -> Literal
[pmid] :: Reference -> Literal
[callNumber] :: Reference -> Literal
[dimensions] :: Reference -> Literal
[scale] :: Reference -> Literal
[categories] :: Reference -> [Literal]
[language] :: Reference -> Literal
[citationNumber] :: Reference -> CNum
[firstReferenceNoteNumber] :: Reference -> Int
[citationLabel] :: Reference -> CLabel
emptyReference :: Reference
numericVars :: [String]
getReference :: [Reference] -> Cite -> Maybe Reference
processCites :: [Reference] -> [[Cite]] -> [[(Cite, Maybe Reference)]]
setPageFirst :: Reference -> Reference
setNearNote :: Style -> [[Cite]] -> [[Cite]]
instance GHC.Generics.Generic Text.CSL.Reference.Reference
instance Data.Data.Data Text.CSL.Reference.Reference
instance GHC.Read.Read Text.CSL.Reference.Reference
instance GHC.Show.Show Text.CSL.Reference.Reference
instance GHC.Classes.Eq Text.CSL.Reference.Reference
instance GHC.Generics.Generic Text.CSL.Reference.CLabel
instance Data.Data.Data Text.CSL.Reference.CLabel
instance GHC.Classes.Eq Text.CSL.Reference.CLabel
instance GHC.Read.Read Text.CSL.Reference.CLabel
instance GHC.Show.Show Text.CSL.Reference.CLabel
instance GHC.Generics.Generic Text.CSL.Reference.CNum
instance Data.Data.Data Text.CSL.Reference.CNum
instance GHC.Num.Num Text.CSL.Reference.CNum
instance GHC.Classes.Eq Text.CSL.Reference.CNum
instance GHC.Read.Read Text.CSL.Reference.CNum
instance GHC.Show.Show Text.CSL.Reference.CNum
instance GHC.Generics.Generic Text.CSL.Reference.RefType
instance Data.Data.Data Text.CSL.Reference.RefType
instance GHC.Classes.Eq Text.CSL.Reference.RefType
instance GHC.Read.Read Text.CSL.Reference.RefType
instance GHC.Generics.Generic Text.CSL.Reference.RefDate
instance Data.Data.Data Text.CSL.Reference.RefDate
instance GHC.Classes.Eq Text.CSL.Reference.RefDate
instance GHC.Read.Read Text.CSL.Reference.RefDate
instance GHC.Show.Show Text.CSL.Reference.RefDate
instance GHC.Generics.Generic Text.CSL.Reference.Empty
instance Data.Data.Data Text.CSL.Reference.Empty
instance GHC.Generics.Generic Text.CSL.Reference.Literal
instance GHC.Base.Monoid Text.CSL.Reference.Literal
instance Data.Data.Data Text.CSL.Reference.Literal
instance GHC.Classes.Eq Text.CSL.Reference.Literal
instance GHC.Read.Read Text.CSL.Reference.Literal
instance GHC.Show.Show Text.CSL.Reference.Literal
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Reference.Literal
instance Data.Aeson.Types.ToJSON.ToJSON Text.CSL.Reference.Literal
instance Data.Yaml.Builder.ToYaml Text.CSL.Reference.Literal
instance Data.String.IsString Text.CSL.Reference.Literal
instance GHC.Show.Show Text.CSL.Reference.Value
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Reference.RefDate
instance Data.Yaml.Builder.ToYaml Text.CSL.Reference.RefDate
instance Data.Aeson.Types.FromJSON.FromJSON [Text.CSL.Reference.RefDate]
instance Data.Aeson.Types.ToJSON.ToJSON [Text.CSL.Reference.RefDate]
instance GHC.Show.Show Text.CSL.Reference.RefType
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Reference.RefType
instance Data.Aeson.Types.ToJSON.ToJSON Text.CSL.Reference.RefType
instance Data.Yaml.Builder.ToYaml Text.CSL.Reference.RefType
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Reference.CNum
instance Data.Aeson.Types.ToJSON.ToJSON Text.CSL.Reference.CNum
instance Data.Yaml.Builder.ToYaml Text.CSL.Reference.CNum
instance GHC.Base.Monoid Text.CSL.Reference.CLabel
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Reference.CLabel
instance Data.Aeson.Types.ToJSON.ToJSON Text.CSL.Reference.CLabel
instance Data.Yaml.Builder.ToYaml Text.CSL.Reference.CLabel
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Reference.Reference
instance Data.Aeson.Types.ToJSON.ToJSON Text.CSL.Reference.Reference
instance Data.Yaml.Builder.ToYaml Text.CSL.Reference.Reference


-- | The CSL implementation
module Text.CSL.Eval.Common
data EvalState
EvalState :: ReferenceMap -> Environment -> [String] -> EvalMode -> Bool -> Bool -> [String] -> [String] -> Bool -> [[Output]] -> [Agent] -> [Output] -> EvalState
[ref] :: EvalState -> ReferenceMap
[env] :: EvalState -> Environment
[debug] :: EvalState -> [String]
[mode] :: EvalState -> EvalMode
[disamb] :: EvalState -> Bool
[consume] :: EvalState -> Bool
[authSub] :: EvalState -> [String]
[consumed] :: EvalState -> [String]
[edtrans] :: EvalState -> Bool
[etal] :: EvalState -> [[Output]]
[contNum] :: EvalState -> [Agent]
[lastName] :: EvalState -> [Output]
data Environment
Env :: Cite -> [CslTerm] -> [MacroMap] -> [Element] -> [Option] -> [Element] -> Abbreviations -> Environment
[cite] :: Environment -> Cite
[terms] :: Environment -> [CslTerm]
[macros] :: Environment -> [MacroMap]
[dates] :: Environment -> [Element]
[options] :: Environment -> [Option]
[names] :: Environment -> [Element]
[abbrevs] :: Environment -> Abbreviations
data EvalMode
EvalSorting :: Cite -> EvalMode
EvalCite :: Cite -> EvalMode
EvalBiblio :: Cite -> EvalMode
isSorting :: EvalMode -> Bool

-- | With the variable name and the variable value search for an
--   abbreviation or return an empty string.
getAbbreviation :: Abbreviations -> String -> String -> String

-- | If the first parameter is <a>True</a> the plural form will be
--   retrieved.
getTerm :: Bool -> Form -> String -> State EvalState String
getStringVar :: String -> State EvalState String
getDateVar :: String -> State EvalState [RefDate]
getLocVar :: State EvalState (String, String)
getVar :: a -> (Value -> a) -> String -> State EvalState a
getAgents :: String -> State EvalState [Agent]
getAgents' :: String -> State EvalState [Agent]
getStringValue :: Value -> String
getOptionVal :: String -> [Option] -> String
isOptionSet :: String -> [Option] -> Bool
isTitleVar :: String -> Bool
isTitleShortVar :: String -> Bool
getTitleShort :: String -> State EvalState String
isVarSet :: String -> State EvalState Bool
withRefMap :: (ReferenceMap -> a) -> State EvalState a

-- | Convert variable to lower case, translating underscores ("_") to
--   dashes ("-")
formatVariable :: String -> String
consumeVariable :: String -> State EvalState ()
consuming :: State EvalState a -> State EvalState a
when' :: Monad m => m Bool -> m [a] -> m [a]
whenElse :: Monad m => m Bool -> m a -> m a -> m a
concatMapM :: (Monad m, Functor m, Eq b) => (a -> m [b]) -> [a] -> m [b]
instance GHC.Show.Show Text.CSL.Eval.Common.EvalState
instance GHC.Classes.Eq Text.CSL.Eval.Common.EvalMode
instance GHC.Show.Show Text.CSL.Eval.Common.EvalMode
instance GHC.Show.Show Text.CSL.Eval.Common.Environment


-- | The CSL implementation
module Text.CSL.Eval.Names
evalNames :: Bool -> [String] -> [Name] -> String -> State EvalState [Output]

-- | The <a>Bool</a> is <a>True</a> when formatting a name with a final
--   "et-al". The first <a>String</a> represents the position and the
--   second the role (e.i. editor, translator, etc.).
formatNames :: Bool -> Delimiter -> String -> String -> [Agent] -> Name -> State EvalState [Output]

-- | The first <a>Bool</a> is <a>True</a> if we are evaluating the
--   bibliography. The <a>String</a> is the cite position. The function
--   also returns the number of contributors to be displayed.
isEtAl :: Bool -> [Option] -> String -> [Agent] -> (Bool, Int)

-- | Generate the <a>Agent</a>s names applying et-al options, with all
--   possible permutations to disambiguate colliding citations. The
--   <a>Bool</a> indicate whether we are formatting the first name or not.
formatName :: EvalMode -> Bool -> Form -> Formatting -> [Option] -> [NamePart] -> Agent -> [Output]
formatTerm :: Form -> Formatting -> Bool -> String -> State EvalState [Output]
formatLabel :: Form -> Formatting -> Bool -> String -> State EvalState [Output]
(<+>) :: Formatted -> Formatted -> Formatted
(<++>) :: [Output] -> [Output] -> [Output]


-- | The CSL implementation
module Text.CSL.Eval.Date
evalDate :: Element -> State EvalState [Output]
getDate :: DateForm -> State EvalState Element
formatDate :: EvalMode -> String -> [CslTerm] -> [DatePart] -> [RefDate] -> [Output]
ordinal :: [CslTerm] -> String -> String -> String
longOrdinal :: [CslTerm] -> String -> String -> String
getOrdinal :: String -> String -> [CslTerm] -> CslTerm
parseRefDate :: RefDate -> [RefDate]


-- | The CSL implementation
module Text.CSL.Eval

-- | Produce the output with a <a>Layout</a>, the <a>EvalMode</a>, a
--   <a>Bool</a> <a>True</a> if the evaluation happens for disambiguation
--   purposes, the <a>Locale</a>, the <a>MacroMap</a>, the position of the
--   cite and the <a>Reference</a>.
evalLayout :: Layout -> EvalMode -> Bool -> [Locale] -> [MacroMap] -> [Option] -> Abbreviations -> Maybe Reference -> [Output]
evalSorting :: EvalMode -> [Locale] -> [MacroMap] -> [Option] -> [Sort] -> Abbreviations -> Maybe Reference -> [Sorting]


-- | This module provides functions for processing the evaluated
--   <a>Output</a> for citation disambiguation.
--   
--   Describe the disambiguation process.
module Text.CSL.Proc.Disamb

-- | Given the <a>Style</a>, the list of references and the citation
--   groups, disambiguate citations according to the style options.
disambCitations :: Style -> [Reference] -> Citations -> [CitationGroup] -> ([(String, String)], [CitationGroup])
mapDisambData :: (Output -> Output) -> CiteData -> CiteData
mapCitationGroup :: ([Output] -> [Output]) -> CitationGroup -> CitationGroup
data GiveNameDisambiguation
NoGiven :: GiveNameDisambiguation
ByCite :: GiveNameDisambiguation
AllNames :: GiveNameDisambiguation
disambAddNames :: GiveNameDisambiguation -> [CiteData] -> [CiteData]
disambAddGivenNames :: [NameData] -> [NameData]
updateContrib :: GiveNameDisambiguation -> [CiteData] -> [NameData] -> Output -> Output
updateOName :: [NameData] -> Output -> Output

-- | Evaluate again a citation group with the <a>EvalState</a>
--   <a>disamb</a> field set to <a>True</a> (for matching the
--   <tt>"disambiguate"</tt> condition).
reEvaluate :: Style -> [CiteData] -> [(Cite, Maybe Reference)] -> CitationGroup -> CitationGroup

-- | Check if the <a>Style</a> has any conditional for disambiguation. In
--   this case the conditional will be try after all other disambiguation
--   strategies have failed. To be used with the generic <a>query</a>
--   function.
hasIfDis :: IfThen -> [Bool]

-- | Get the list of disambiguation options set in the <a>Style</a> for
--   citations.
getCitDisambOptions :: Style -> [String]

-- | Group citation data (with possible alternative names) of citations
--   which have a duplicate (same <a>collision</a>, and same <a>citYear</a>
--   if year suffix disambiiguation is used). If the first <a>Bool</a> is
--   <a>False</a>, then we need to retrieve data for year suffix
--   disambiguation. The second <a>Bool</a> is <a>True</a> when comparing
--   both year and contributors' names for finding duplicates (when the
--   year-suffix option is set).
getDuplCiteData :: Bool -> Bool -> [CitationGroup] -> [[CiteData]]
rmExtras :: [Output] -> [Output]

-- | For an evaluated citation get its <a>CiteData</a>. The disambiguated
--   citation and the year fields are empty. Only the first list of
--   contributors' disambiguation data are collected for disambiguation
--   purposes.
getCiteData :: Output -> [CiteData]
getYears :: Output -> [(String, String)]
getDuplNameData :: [CitationGroup] -> [[NameData]]
getDuplNames :: [CitationGroup] -> [[Output]]
getName :: Output -> [NameData]
generateYearSuffix :: [Reference] -> [(String, [Output])] -> [(String, String)]
setYearSuffCollision :: Bool -> [CiteData] -> [Output] -> [Output]
updateYearSuffixes :: [(String, String)] -> Output -> Output
getYearSuffixes :: CitationGroup -> [(String, [Output])]
rmYearSuff :: [CitationGroup] -> [CitationGroup]

-- | Try to disambiguate a list of lists by returning the first non
--   colliding element, if any, of each list:
--   
--   <pre>
--   disambiguate [[1,2],[1,3],[2]] = [[2],[3],[2]]
--   </pre>
disambiguate :: (Eq a) => [[a]] -> [[a]]

-- | For each element a list of <a>Bool</a>: <a>True</a> if the element has
--   a duplicate in the list:
--   
--   <pre>
--   same [1,2,1] = [True,False,True]
--   </pre>
same :: Eq a => [a] -> [Bool]
hasDuplicates :: Eq a => [a] -> Bool
allTheSame :: Eq a => [a] -> Bool

-- | Add the year suffix to the year. Needed for disambiguation.
addYearSuffix :: Output -> Output
hasYear :: Output -> Bool
hasYearSuf :: Output -> Bool

-- | Removes all given names and name hashes from OName elements.
rmHashAndGivenNames :: Output -> Output
rmGivenNames :: Output -> Output

-- | Add, with <a>proc</a>, a give name to the family name. Needed for
--   disambiguation.
addGivenNames :: [Output] -> [Output]

-- | Map the evaluated output of a citation group.
mapGroupOutput :: (Output -> [a]) -> CitationGroup -> [a]
instance GHC.Classes.Eq Text.CSL.Proc.Disamb.GiveNameDisambiguation
instance GHC.Show.Show Text.CSL.Proc.Disamb.GiveNameDisambiguation


-- | This module provides functions for processing the evaluated
--   <a>Output</a> for citation collapsing.
module Text.CSL.Proc.Collapse

-- | Collapse citations according to the style options.
collapseCitGroups :: Style -> [CitationGroup] -> [CitationGroup]

-- | Get the collapse option set in the <a>Style</a> for citations.
getCollapseOptions :: Style -> [String]
collapseNumber :: CitationGroup -> CitationGroup
groupCites :: [(Cite, Output)] -> [(Cite, Output)]
getYearAndSuf :: Output -> Output
collapseYear :: Style -> String -> CitationGroup -> CitationGroup
collapseYearSuf :: Bool -> String -> [(Cite, Output)] -> [Output]
collapseYearSufRanged :: [Output] -> [Output]
addCiteAffixes :: Cite -> Output -> Output
isNumStyle :: [Output] -> Bool

-- | Group consecutive integers:
--   
--   <pre>
--   groupConsec [1,2,3,5,6,8,9] == [[1,2,3],[5,6],[8,9]]
--   </pre>
groupConsec :: [Int] -> [[Int]]
groupConsecWith :: (a -> Int) -> [a] -> [[a]]


-- | This module provides functions for processing the evaluated
--   <a>Output</a> for disambiguation and citation collapsing.
module Text.CSL.Proc
data ProcOpts
ProcOpts :: BibOpts -> Bool -> ProcOpts
[bibOpts] :: ProcOpts -> BibOpts
[linkCitations] :: ProcOpts -> Bool
data BibOpts
Select :: [(String, String)] -> [(String, String)] -> BibOpts
Include :: [(String, String)] -> [(String, String)] -> BibOpts
Exclude :: [(String, String)] -> [(String, String)] -> BibOpts
newtype FieldVal
FieldVal :: (String, String) -> FieldVal
[unFieldVal] :: FieldVal -> (String, String)
procOpts :: ProcOpts

-- | With a <a>Style</a>, a list of <a>Reference</a>s and the list of
--   citation groups (the list of citations with their locator), produce
--   the <a>Formatted</a> for each citation group.
processCitations :: ProcOpts -> Style -> [Reference] -> Citations -> [Formatted]

-- | With a <a>Style</a> and the list of <a>Reference</a>s produce the
--   <a>Formatted</a> for the bibliography.
processBibliography :: ProcOpts -> Style -> [Reference] -> [Formatted]

-- | With a <a>Style</a>, a list of <a>Reference</a>s and the list of
--   <a>Citations</a>, produce the <a>Formatted</a> for each citation group
--   and the bibliography.
citeproc :: ProcOpts -> Style -> [Reference] -> Citations -> BiblioData

-- | Given the CSL <a>Style</a> and the list of <a>Reference</a>s sort the
--   list according to the <a>Style</a> and assign the citation number to
--   each <a>Reference</a>.
procRefs :: Style -> [Reference] -> [Reference]
sortItems :: Show a => [(a, [Sorting])] -> [a]

-- | With a <a>Style</a> and a sorted list of <a>Reference</a>s produce the
--   evaluated output for the bibliography.
procBiblio :: BibOpts -> Style -> [Reference] -> [[Output]]
subsequentAuthorSubstitute :: Bibliography -> [[Output]] -> [[Output]]
filterRefs :: BibOpts -> [Reference] -> [Reference]

-- | Given the CSL <a>Style</a> and the list of <a>Cite</a>s coupled with
--   their <a>Reference</a>s, generate a <a>CitationGroup</a>. The
--   citations are sorted according to the <a>Style</a>.
procGroup :: Style -> [(Cite, Maybe Reference)] -> CitationGroup
formatBiblioLayout :: Formatting -> Delimiter -> [Output] -> [Output]
formatCitLayout :: Style -> CitationGroup -> Formatted
addAffixes :: Formatting -> [Output] -> [Output]

-- | The <a>Bool</a> is <a>True</a> if we are formatting a textual citation
--   (in pandoc terminology).
localModifiers :: Style -> Bool -> Cite -> Output -> Output
contribOnly :: Style -> Output -> Output
instance GHC.Show.Show Text.CSL.Proc.FieldVal
instance GHC.Classes.Eq Text.CSL.Proc.ProcOpts
instance GHC.Read.Read Text.CSL.Proc.ProcOpts
instance GHC.Show.Show Text.CSL.Proc.ProcOpts
instance GHC.Classes.Eq Text.CSL.Proc.BibOpts
instance GHC.Read.Read Text.CSL.Proc.BibOpts
instance GHC.Show.Show Text.CSL.Proc.BibOpts
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Proc.FieldVal
instance Data.Aeson.Types.FromJSON.FromJSON Text.CSL.Proc.BibOpts


module Text.CSL.Data

-- | Raises <a>CSLLocaleException</a> on error.
getLocale :: String -> IO ByteString
data CSLLocaleException
CSLLocaleNotFound :: String -> CSLLocaleException
CSLLocaleReadError :: IOException -> CSLLocaleException
getDefaultCSL :: IO ByteString
getManPage :: IO ByteString
getLicense :: IO ByteString
langBase :: [(String, String)]
instance GHC.Show.Show Text.CSL.Data.CSLLocaleException
instance GHC.Exception.Exception Text.CSL.Data.CSLLocaleException


-- | Parser for CSL XML files.
module Text.CSL.Parser

-- | Read and parse a CSL style file into a localized sytle.
readCSLFile :: Maybe String -> FilePath -> IO Style

-- | Parse a <a>String</a> into a <a>Style</a> (with default locale).
parseCSL :: String -> Style
parseCSL' :: ByteString -> Style

-- | Parse locale. Raises <tt>CSLLocaleException</tt> on error.
parseLocale :: String -> IO Locale

-- | Merge locale into a CSL style.
localizeCSL :: Maybe String -> Style -> IO Style


module Text.CSL.Input.Bibtex

-- | Parse a BibTeX or BibLaTeX file into a list of <a>Reference</a>s. If
--   the first parameter is true, the file will be treated as BibTeX;
--   otherwse as BibLaTeX. If the second parameter is true, an
--   "untitlecase" transformation will be performed.
readBibtex :: Bool -> Bool -> FilePath -> IO [Reference]

-- | Like <a>readBibtex</a> but operates on a String rather than a file.
readBibtexString :: Bool -> Bool -> String -> IO [Reference]

-- | Pure version of readBibtexString (does not try to get the language
--   from the environment).
readBibtexString' :: Bool -> Bool -> Lang -> Locale -> String -> [Reference]

-- | A representation of a language and localization.
data Lang
Lang :: String -> String -> Lang

-- | Prints a <a>Lang</a> in BCP 47 format.
langToLocale :: Lang -> String

-- | Get <a>Lang</a> from the environment variable LANG, defaulting to
--   en-US.
getLangFromEnv :: IO Lang


module Text.CSL.Input.Bibutils

-- | Read a file with a bibliographic database. The database format is
--   recognized by the file extension.
--   
--   Supported formats are: <tt>json</tt>, <tt>mods</tt>, <tt>bibtex</tt>,
--   <tt>biblatex</tt>, <tt>ris</tt>, <tt>endnote</tt>,
--   <tt>endnotexml</tt>, <tt>isi</tt>, <tt>medline</tt>, and
--   <tt>copac</tt>.
readBiblioFile :: FilePath -> IO [Reference]
readBiblioString :: BibFormat -> String -> IO [Reference]
data BibFormat
Json :: BibFormat
Yaml :: BibFormat
Bibtex :: BibFormat
BibLatex :: BibFormat
Ris :: BibFormat
Endnote :: BibFormat
EndnotXml :: BibFormat
Isi :: BibFormat
Medline :: BibFormat
Copac :: BibFormat
Mods :: BibFormat
convertRefs :: Maybe MetaValue -> Either String [Reference]


-- | <i>citeproc-hs</i> is a library for automatically formatting
--   bibliographic reference citations into a variety of styles using a
--   macro language called Citation Style Language (CSL). More details on
--   CSL can be found here: <a>http://citationstyles.org/</a>.
--   
--   This module documents and exports the library API.
module Text.CSL

-- | Read a file with a bibliographic database. The database format is
--   recognized by the file extension.
--   
--   Supported formats are: <tt>json</tt>, <tt>mods</tt>, <tt>bibtex</tt>,
--   <tt>biblatex</tt>, <tt>ris</tt>, <tt>endnote</tt>,
--   <tt>endnotexml</tt>, <tt>isi</tt>, <tt>medline</tt>, and
--   <tt>copac</tt>.
readBiblioFile :: FilePath -> IO [Reference]
data BibFormat
Json :: BibFormat
Yaml :: BibFormat
Bibtex :: BibFormat
BibLatex :: BibFormat
Ris :: BibFormat
Endnote :: BibFormat
EndnotXml :: BibFormat
Isi :: BibFormat
Medline :: BibFormat
Copac :: BibFormat
Mods :: BibFormat
readBiblioString :: BibFormat -> String -> IO [Reference]

-- | The <a>Reference</a> record.
data Reference
Reference :: Literal -> RefType -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [Agent] -> [RefDate] -> [RefDate] -> [RefDate] -> [RefDate] -> [RefDate] -> [RefDate] -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Literal -> Literal -> Literal -> Literal -> Literal -> Literal -> Literal -> Literal -> Literal -> [Literal] -> Literal -> CNum -> Int -> CLabel -> Reference
[refId] :: Reference -> Literal
[refType] :: Reference -> RefType
[author] :: Reference -> [Agent]
[editor] :: Reference -> [Agent]
[translator] :: Reference -> [Agent]
[recipient] :: Reference -> [Agent]
[interviewer] :: Reference -> [Agent]
[composer] :: Reference -> [Agent]
[director] :: Reference -> [Agent]
[illustrator] :: Reference -> [Agent]
[originalAuthor] :: Reference -> [Agent]
[containerAuthor] :: Reference -> [Agent]
[collectionEditor] :: Reference -> [Agent]
[editorialDirector] :: Reference -> [Agent]
[reviewedAuthor] :: Reference -> [Agent]
[issued] :: Reference -> [RefDate]
[eventDate] :: Reference -> [RefDate]
[accessed] :: Reference -> [RefDate]
[container] :: Reference -> [RefDate]
[originalDate] :: Reference -> [RefDate]
[submitted] :: Reference -> [RefDate]
[title] :: Reference -> Formatted
[titleShort] :: Reference -> Formatted
[reviewedTitle] :: Reference -> Formatted
[containerTitle] :: Reference -> Formatted
[volumeTitle] :: Reference -> Formatted
[collectionTitle] :: Reference -> Formatted
[containerTitleShort] :: Reference -> Formatted
[collectionNumber] :: Reference -> Formatted
[originalTitle] :: Reference -> Formatted
[publisher] :: Reference -> Formatted
[originalPublisher] :: Reference -> Formatted
[publisherPlace] :: Reference -> Formatted
[originalPublisherPlace] :: Reference -> Formatted
[authority] :: Reference -> Formatted
[jurisdiction] :: Reference -> Formatted
[archive] :: Reference -> Formatted
[archivePlace] :: Reference -> Formatted
[archiveLocation] :: Reference -> Formatted
[event] :: Reference -> Formatted
[eventPlace] :: Reference -> Formatted
[page] :: Reference -> Formatted
[pageFirst] :: Reference -> Formatted
[numberOfPages] :: Reference -> Formatted
[version] :: Reference -> Formatted
[volume] :: Reference -> Formatted
[numberOfVolumes] :: Reference -> Formatted
[issue] :: Reference -> Formatted
[chapterNumber] :: Reference -> Formatted
[medium] :: Reference -> Formatted
[status] :: Reference -> Formatted
[edition] :: Reference -> Formatted
[section] :: Reference -> Formatted
[source] :: Reference -> Formatted
[genre] :: Reference -> Formatted
[note] :: Reference -> Formatted
[annote] :: Reference -> Formatted
[abstract] :: Reference -> Formatted
[keyword] :: Reference -> Formatted
[number] :: Reference -> Formatted
[references] :: Reference -> Formatted
[url] :: Reference -> Literal
[doi] :: Reference -> Literal
[isbn] :: Reference -> Literal
[issn] :: Reference -> Literal
[pmcid] :: Reference -> Literal
[pmid] :: Reference -> Literal
[callNumber] :: Reference -> Literal
[dimensions] :: Reference -> Literal
[scale] :: Reference -> Literal
[categories] :: Reference -> [Literal]
[language] :: Reference -> Literal
[citationNumber] :: Reference -> CNum
[firstReferenceNoteNumber] :: Reference -> Int
[citationLabel] :: Reference -> CLabel
getReference :: [Reference] -> Cite -> Maybe Reference
setNearNote :: Style -> [[Cite]] -> [[Cite]]

-- | Read and parse a CSL style file into a localized sytle.
readCSLFile :: Maybe String -> FilePath -> IO Style

-- | Parse a <a>String</a> into a <a>Style</a> (with default locale).
parseCSL :: String -> Style
parseCSL' :: ByteString -> Style

-- | Merge locale into a CSL style.
localizeCSL :: Maybe String -> Style -> IO Style

-- | The representation of a parsed CSL style.
data Style
Style :: String -> String -> Maybe CSInfo -> String -> [Locale] -> Abbreviations -> [Option] -> [MacroMap] -> Citation -> Maybe Bibliography -> Style
[styleVersion] :: Style -> String
[styleClass] :: Style -> String
[styleInfo] :: Style -> Maybe CSInfo
[styleDefaultLocale] :: Style -> String
[styleLocale] :: Style -> [Locale]
[styleAbbrevs] :: Style -> Abbreviations
[csOptions] :: Style -> [Option]
[csMacros] :: Style -> [MacroMap]
[citation] :: Style -> Citation
[biblio] :: Style -> Maybe Bibliography
data Citation
Citation :: [Option] -> [Sort] -> Layout -> Citation
[citOptions] :: Citation -> [Option]
[citSort] :: Citation -> [Sort]
[citLayout] :: Citation -> Layout
data Bibliography
Bibliography :: [Option] -> [Sort] -> Layout -> Bibliography
[bibOptions] :: Bibliography -> [Option]
[bibSort] :: Bibliography -> [Sort]
[bibLayout] :: Bibliography -> Layout
data Cite
Cite :: String -> Formatted -> Formatted -> String -> String -> String -> String -> Bool -> Bool -> Bool -> Int -> Cite
[citeId] :: Cite -> String
[citePrefix] :: Cite -> Formatted
[citeSuffix] :: Cite -> Formatted
[citeLabel] :: Cite -> String
[citeLocator] :: Cite -> String
[citeNoteNumber] :: Cite -> String
[citePosition] :: Cite -> String
[nearNote] :: Cite -> Bool
[authorInText] :: Cite -> Bool
[suppressAuthor] :: Cite -> Bool
[citeHash] :: Cite -> Int
newtype Abbreviations
Abbreviations :: Map String (Map String (Map String String)) -> Abbreviations
[unAbbreviations] :: Abbreviations -> Map String (Map String (Map String String))
emptyCite :: Cite
data ProcOpts
ProcOpts :: BibOpts -> Bool -> ProcOpts
[bibOpts] :: ProcOpts -> BibOpts
[linkCitations] :: ProcOpts -> Bool
procOpts :: ProcOpts
data BibOpts
Select :: [(String, String)] -> [(String, String)] -> BibOpts
Include :: [(String, String)] -> [(String, String)] -> BibOpts
Exclude :: [(String, String)] -> [(String, String)] -> BibOpts

-- | With a <a>Style</a>, a list of <a>Reference</a>s and the list of
--   <a>Citations</a>, produce the <a>Formatted</a> for each citation group
--   and the bibliography.
citeproc :: ProcOpts -> Style -> [Reference] -> Citations -> BiblioData

-- | With a <a>Style</a>, a list of <a>Reference</a>s and the list of
--   citation groups (the list of citations with their locator), produce
--   the <a>Formatted</a> for each citation group.
processCitations :: ProcOpts -> Style -> [Reference] -> Citations -> [Formatted]

-- | With a <a>Style</a> and the list of <a>Reference</a>s produce the
--   <a>Formatted</a> for the bibliography.
processBibliography :: ProcOpts -> Style -> [Reference] -> [Formatted]
data BiblioData
BD :: [Formatted] -> [Formatted] -> [String] -> BiblioData
[citations] :: BiblioData -> [Formatted]
[bibliography] :: BiblioData -> [Formatted]
[citationIds] :: BiblioData -> [String]

-- | Render the <a>Formatted</a> into a plain text string.
renderPlain :: Formatted -> String
renderPandoc :: Style -> Formatted -> [Inline]
renderPandoc' :: Style -> (Formatted, String) -> Block

module Text.CSL.Pandoc

-- | Process a <a>Pandoc</a> document by adding citations formatted
--   according to a CSL style. Add a bibliography (if one is called for) at
--   the end of the document.
processCites :: Style -> [Reference] -> Pandoc -> Pandoc

-- | Process a <a>Pandoc</a> document by adding citations formatted
--   according to a CSL style. The style filename is derived from the
--   <tt>csl</tt> field of the metadata, and the references are taken from
--   the <a>references</a> field or read from a file in the
--   <a>bibliography</a> field.
processCites' :: Pandoc -> IO Pandoc
