-- 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 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 (pandoc &gt;= 1.12), and also has a mode for
--   converting bibliographic databases a YAML format suitable for
--   inclusion in pandoc YAML metadata.
@package pandoc-citeproc
@version 0.3.0.1


module Text.CSL.Data
getLocale :: String -> IO ByteString
getDefaultCSL :: IO ByteString
langBase :: [(String, String)]


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

-- | 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
hasOrdinals :: Data a => a -> Bool
rmOrdinals :: Data a => a -> a
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
Elements :: Formatting -> [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 -> 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
rmTitleCase :: Formatting -> Formatting
data Quote
NativeQuote :: Quote
ParsedQuote :: Quote
NoQuote :: Quote
emptyFormatting :: Formatting
unsetAffixes :: Formatting -> Formatting
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

-- | 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 :: String -> [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 <a>author-in-text</a> 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] -> BiblioData
citations :: BiblioData -> [Formatted]
bibliography :: BiblioData -> [Formatted]

-- | 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 :: String -> [Output] -> [[Output]] -> [Output] -> NameData
nameKey :: NameData -> String
nameCollision :: NameData -> [Output]
nameDisambData :: NameData -> [[Output]]
nameDataSolved :: NameData -> [Output]
instance Typeable Formatted
instance Typeable Abbreviations
instance Typeable Condition
instance Typeable Match
instance Typeable Sorting
instance Typeable Sort
instance Typeable Form
instance Typeable Gender
instance Typeable CslTerm
instance Typeable NumericForm
instance Typeable DateForm
instance Typeable Plural
instance Typeable Quote
instance Typeable Formatting
instance Typeable NamePart
instance Typeable Name
instance Typeable DatePart
instance Typeable Element
instance Typeable IfThen
instance Typeable Locale
instance Typeable Layout
instance Typeable Bibliography
instance Typeable Citation
instance Typeable CSAuthor
instance Typeable CSCategory
instance Typeable CSInfo
instance Typeable Style
instance Typeable CiteprocError
instance Typeable Output
instance Typeable Cite
instance Typeable CitationGroup
instance Typeable BiblioData
instance Typeable CiteData
instance Typeable NameData
instance Show Formatted
instance Read Formatted
instance Eq Formatted
instance Data Formatted
instance Generic Formatted
instance Show Abbreviations
instance Read Abbreviations
instance Data Abbreviations
instance Generic Abbreviations
instance Eq Condition
instance Show Condition
instance Read Condition
instance Data Condition
instance Generic Condition
instance Show Match
instance Read Match
instance Eq Match
instance Data Match
instance Generic Match
instance Read Sorting
instance Show Sorting
instance Eq Sorting
instance Data Sorting
instance Generic Sorting
instance Eq Sort
instance Show Sort
instance Read Sort
instance Data Sort
instance Generic Sort
instance Eq Form
instance Show Form
instance Read Form
instance Data Form
instance Generic Form
instance Eq Gender
instance Show Gender
instance Read Gender
instance Data Gender
instance Generic Gender
instance Show CslTerm
instance Read CslTerm
instance Eq CslTerm
instance Data CslTerm
instance Generic CslTerm
instance Eq NumericForm
instance Show NumericForm
instance Read NumericForm
instance Data NumericForm
instance Generic NumericForm
instance Eq DateForm
instance Show DateForm
instance Read DateForm
instance Data DateForm
instance Generic DateForm
instance Eq Plural
instance Show Plural
instance Read Plural
instance Data Plural
instance Generic Plural
instance Show Quote
instance Read Quote
instance Eq Quote
instance Ord Quote
instance Data Quote
instance Generic Quote
instance Read Formatting
instance Eq Formatting
instance Ord Formatting
instance Data Formatting
instance Generic Formatting
instance Show NamePart
instance Read NamePart
instance Eq NamePart
instance Data NamePart
instance Generic NamePart
instance Eq Name
instance Show Name
instance Read Name
instance Data Name
instance Generic Name
instance Show DatePart
instance Read DatePart
instance Eq DatePart
instance Data DatePart
instance Generic DatePart
instance Show Element
instance Read Element
instance Eq Element
instance Data Element
instance Generic Element
instance Eq IfThen
instance Show IfThen
instance Read IfThen
instance Data IfThen
instance Generic IfThen
instance Show Locale
instance Read Locale
instance Eq Locale
instance Data Locale
instance Generic Locale
instance Show Layout
instance Read Layout
instance Data Layout
instance Generic Layout
instance Show Bibliography
instance Read Bibliography
instance Data Bibliography
instance Generic Bibliography
instance Show Citation
instance Read Citation
instance Data Citation
instance Generic Citation
instance Show CSAuthor
instance Read CSAuthor
instance Eq CSAuthor
instance Data CSAuthor
instance Generic CSAuthor
instance Show CSCategory
instance Read CSCategory
instance Eq CSCategory
instance Data CSCategory
instance Generic CSCategory
instance Show CSInfo
instance Read CSInfo
instance Data CSInfo
instance Generic CSInfo
instance Show Style
instance Read Style
instance Data Style
instance Generic Style
instance Eq CiteprocError
instance Ord CiteprocError
instance Show CiteprocError
instance Data CiteprocError
instance Generic CiteprocError
instance Eq Output
instance Ord Output
instance Show Output
instance Data Output
instance Generic Output
instance Show Cite
instance Eq Cite
instance Data Cite
instance Generic Cite
instance Show CitationGroup
instance Eq CitationGroup
instance Data CitationGroup
instance Generic CitationGroup
instance Show BiblioData
instance Data BiblioData
instance Generic BiblioData
instance Show CiteData
instance Data CiteData
instance Generic CiteData
instance Show NameData
instance Data NameData
instance Generic NameData
instance Datatype D1Formatted
instance Constructor C1_0Formatted
instance Selector S1_0_0Formatted
instance Datatype D1Abbreviations
instance Constructor C1_0Abbreviations
instance Selector S1_0_0Abbreviations
instance Datatype D1Condition
instance Constructor C1_0Condition
instance Selector S1_0_0Condition
instance Selector S1_0_1Condition
instance Selector S1_0_2Condition
instance Selector S1_0_3Condition
instance Selector S1_0_4Condition
instance Selector S1_0_5Condition
instance Selector S1_0_6Condition
instance Datatype D1Match
instance Constructor C1_0Match
instance Constructor C1_1Match
instance Constructor C1_2Match
instance Datatype D1Sorting
instance Constructor C1_0Sorting
instance Constructor C1_1Sorting
instance Datatype D1Sort
instance Constructor C1_0Sort
instance Constructor C1_1Sort
instance Datatype D1Form
instance Constructor C1_0Form
instance Constructor C1_1Form
instance Constructor C1_2Form
instance Constructor C1_3Form
instance Constructor C1_4Form
instance Constructor C1_5Form
instance Constructor C1_6Form
instance Datatype D1Gender
instance Constructor C1_0Gender
instance Constructor C1_1Gender
instance Constructor C1_2Gender
instance Datatype D1CslTerm
instance Constructor C1_0CslTerm
instance Selector S1_0_0CslTerm
instance Selector S1_0_1CslTerm
instance Selector S1_0_2CslTerm
instance Selector S1_0_3CslTerm
instance Selector S1_0_4CslTerm
instance Selector S1_0_5CslTerm
instance Selector S1_0_6CslTerm
instance Datatype D1NumericForm
instance Constructor C1_0NumericForm
instance Constructor C1_1NumericForm
instance Constructor C1_2NumericForm
instance Constructor C1_3NumericForm
instance Datatype D1DateForm
instance Constructor C1_0DateForm
instance Constructor C1_1DateForm
instance Constructor C1_2DateForm
instance Datatype D1Plural
instance Constructor C1_0Plural
instance Constructor C1_1Plural
instance Constructor C1_2Plural
instance Datatype D1Quote
instance Constructor C1_0Quote
instance Constructor C1_1Quote
instance Constructor C1_2Quote
instance Datatype D1Formatting
instance Constructor C1_0Formatting
instance Selector S1_0_0Formatting
instance Selector S1_0_1Formatting
instance Selector S1_0_2Formatting
instance Selector S1_0_3Formatting
instance Selector S1_0_4Formatting
instance Selector S1_0_5Formatting
instance Selector S1_0_6Formatting
instance Selector S1_0_7Formatting
instance Selector S1_0_8Formatting
instance Selector S1_0_9Formatting
instance Selector S1_0_10Formatting
instance Selector S1_0_11Formatting
instance Selector S1_0_12Formatting
instance Selector S1_0_13Formatting
instance Datatype D1NamePart
instance Constructor C1_0NamePart
instance Datatype D1Name
instance Constructor C1_0Name
instance Constructor C1_1Name
instance Constructor C1_2Name
instance Datatype D1DatePart
instance Constructor C1_0DatePart
instance Selector S1_0_0DatePart
instance Selector S1_0_1DatePart
instance Selector S1_0_2DatePart
instance Selector S1_0_3DatePart
instance Datatype D1Element
instance Constructor C1_0Element
instance Constructor C1_1Element
instance Constructor C1_2Element
instance Constructor C1_3Element
instance Constructor C1_4Element
instance Constructor C1_5Element
instance Constructor C1_6Element
instance Constructor C1_7Element
instance Constructor C1_8Element
instance Constructor C1_9Element
instance Constructor C1_10Element
instance Constructor C1_11Element
instance Datatype D1IfThen
instance Constructor C1_0IfThen
instance Datatype D1Locale
instance Constructor C1_0Locale
instance Selector S1_0_0Locale
instance Selector S1_0_1Locale
instance Selector S1_0_2Locale
instance Selector S1_0_3Locale
instance Selector S1_0_4Locale
instance Datatype D1Layout
instance Constructor C1_0Layout
instance Selector S1_0_0Layout
instance Selector S1_0_1Layout
instance Selector S1_0_2Layout
instance Datatype D1Bibliography
instance Constructor C1_0Bibliography
instance Selector S1_0_0Bibliography
instance Selector S1_0_1Bibliography
instance Selector S1_0_2Bibliography
instance Datatype D1Citation
instance Constructor C1_0Citation
instance Selector S1_0_0Citation
instance Selector S1_0_1Citation
instance Selector S1_0_2Citation
instance Datatype D1CSAuthor
instance Constructor C1_0CSAuthor
instance Datatype D1CSCategory
instance Constructor C1_0CSCategory
instance Datatype D1CSInfo
instance Constructor C1_0CSInfo
instance Selector S1_0_0CSInfo
instance Selector S1_0_1CSInfo
instance Selector S1_0_2CSInfo
instance Selector S1_0_3CSInfo
instance Selector S1_0_4CSInfo
instance Datatype D1Style
instance Constructor C1_0Style
instance Selector S1_0_0Style
instance Selector S1_0_1Style
instance Selector S1_0_2Style
instance Selector S1_0_3Style
instance Selector S1_0_4Style
instance Selector S1_0_5Style
instance Selector S1_0_6Style
instance Selector S1_0_7Style
instance Selector S1_0_8Style
instance Selector S1_0_9Style
instance Datatype D1CiteprocError
instance Constructor C1_0CiteprocError
instance Constructor C1_1CiteprocError
instance Datatype D1Output
instance Constructor C1_0Output
instance Constructor C1_1Output
instance Constructor C1_2Output
instance Constructor C1_3Output
instance Constructor C1_4Output
instance Constructor C1_5Output
instance Constructor C1_6Output
instance Constructor C1_7Output
instance Constructor C1_8Output
instance Constructor C1_9Output
instance Constructor C1_10Output
instance Constructor C1_11Output
instance Constructor C1_12Output
instance Constructor C1_13Output
instance Constructor C1_14Output
instance Constructor C1_15Output
instance Datatype D1Cite
instance Constructor C1_0Cite
instance Selector S1_0_0Cite
instance Selector S1_0_1Cite
instance Selector S1_0_2Cite
instance Selector S1_0_3Cite
instance Selector S1_0_4Cite
instance Selector S1_0_5Cite
instance Selector S1_0_6Cite
instance Selector S1_0_7Cite
instance Selector S1_0_8Cite
instance Selector S1_0_9Cite
instance Selector S1_0_10Cite
instance Datatype D1CitationGroup
instance Constructor C1_0CitationGroup
instance Datatype D1BiblioData
instance Constructor C1_0BiblioData
instance Selector S1_0_0BiblioData
instance Selector S1_0_1BiblioData
instance Datatype D1CiteData
instance Constructor C1_0CiteData
instance Selector S1_0_0CiteData
instance Selector S1_0_1CiteData
instance Selector S1_0_2CiteData
instance Selector S1_0_3CiteData
instance Selector S1_0_4CiteData
instance Selector S1_0_5CiteData
instance Selector S1_0_6CiteData
instance Datatype D1NameData
instance Constructor C1_0NameData
instance Selector S1_0_0NameData
instance Selector S1_0_1NameData
instance Selector S1_0_2NameData
instance Selector S1_0_3NameData
instance Eq NameData
instance Eq CiteData
instance FromJSON [[Cite]]
instance FromJSON Cite
instance Show Formatting
instance Ord Sorting
instance FromJSON Abbreviations
instance Monoid Formatted
instance IsString Formatted
instance ToJSON Formatted
instance FromJSON Formatted


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


-- | 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 CSL implementation
module Text.CSL.Eval.Output
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 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 :: Data a => a -> ReferenceMap
formatField :: String -> String
fromValue :: Data a => Value -> Maybe a
isValueSet :: Value -> Bool
data Empty
Empty :: Empty
data Agent
Agent :: [Formatted] -> Formatted -> Formatted -> Formatted -> Formatted -> Formatted -> Bool -> Agent
givenName :: Agent -> [Formatted]
droppingPart :: Agent -> Formatted
nonDroppingPart :: Agent -> Formatted
familyName :: Agent -> Formatted
nameSuffix :: Agent -> Formatted
literal :: Agent -> Formatted
commaSuffix :: Agent -> Bool
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
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

-- | 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 -> Literal -> 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 -> Literal
emptyReference :: Reference
numericVars :: [String]
parseLocator :: String -> (String, String)
getReference :: [Reference] -> Cite -> Maybe Reference
processCites :: [Reference] -> [[Cite]] -> [[(Cite, Reference)]]
setPageFirst :: Reference -> Reference
setNearNote :: Style -> [[Cite]] -> [[Cite]]
object' :: [Pair] -> Value
instance [incoherent] Typeable Literal
instance [incoherent] Typeable Empty
instance [incoherent] Typeable Agent
instance [incoherent] Typeable RefDate
instance [incoherent] Typeable RefType
instance [incoherent] Typeable CNum
instance [incoherent] Typeable Reference
instance [incoherent] Show Literal
instance [incoherent] Read Literal
instance [incoherent] Eq Literal
instance [incoherent] Data Literal
instance [incoherent] Monoid Literal
instance [incoherent] Generic Literal
instance [incoherent] Data Empty
instance [incoherent] Generic Empty
instance [incoherent] Show Agent
instance [incoherent] Read Agent
instance [incoherent] Eq Agent
instance [incoherent] Data Agent
instance [incoherent] Generic Agent
instance [incoherent] Show RefDate
instance [incoherent] Read RefDate
instance [incoherent] Eq RefDate
instance [incoherent] Data RefDate
instance [incoherent] Generic RefDate
instance [incoherent] Read RefType
instance [incoherent] Eq RefType
instance [incoherent] Data RefType
instance [incoherent] Generic RefType
instance [incoherent] Show CNum
instance [incoherent] Read CNum
instance [incoherent] Eq CNum
instance [incoherent] Num CNum
instance [incoherent] Data CNum
instance [incoherent] Generic CNum
instance [incoherent] Eq Reference
instance [incoherent] Show Reference
instance [incoherent] Read Reference
instance [incoherent] Data Reference
instance [incoherent] Generic Reference
instance Datatype D1Literal
instance Constructor C1_0Literal
instance Selector S1_0_0Literal
instance Datatype D1Empty
instance Constructor C1_0Empty
instance Datatype D1Agent
instance Constructor C1_0Agent
instance Selector S1_0_0Agent
instance Selector S1_0_1Agent
instance Selector S1_0_2Agent
instance Selector S1_0_3Agent
instance Selector S1_0_4Agent
instance Selector S1_0_5Agent
instance Selector S1_0_6Agent
instance Datatype D1RefDate
instance Constructor C1_0RefDate
instance Selector S1_0_0RefDate
instance Selector S1_0_1RefDate
instance Selector S1_0_2RefDate
instance Selector S1_0_3RefDate
instance Selector S1_0_4RefDate
instance Selector S1_0_5RefDate
instance Datatype D1RefType
instance Constructor C1_0RefType
instance Constructor C1_1RefType
instance Constructor C1_2RefType
instance Constructor C1_3RefType
instance Constructor C1_4RefType
instance Constructor C1_5RefType
instance Constructor C1_6RefType
instance Constructor C1_7RefType
instance Constructor C1_8RefType
instance Constructor C1_9RefType
instance Constructor C1_10RefType
instance Constructor C1_11RefType
instance Constructor C1_12RefType
instance Constructor C1_13RefType
instance Constructor C1_14RefType
instance Constructor C1_15RefType
instance Constructor C1_16RefType
instance Constructor C1_17RefType
instance Constructor C1_18RefType
instance Constructor C1_19RefType
instance Constructor C1_20RefType
instance Constructor C1_21RefType
instance Constructor C1_22RefType
instance Constructor C1_23RefType
instance Constructor C1_24RefType
instance Constructor C1_25RefType
instance Constructor C1_26RefType
instance Constructor C1_27RefType
instance Constructor C1_28RefType
instance Constructor C1_29RefType
instance Constructor C1_30RefType
instance Constructor C1_31RefType
instance Constructor C1_32RefType
instance Constructor C1_33RefType
instance Constructor C1_34RefType
instance Constructor C1_35RefType
instance Datatype D1CNum
instance Constructor C1_0CNum
instance Selector S1_0_0CNum
instance Datatype D1Reference
instance Constructor C1_0Reference
instance Selector S1_0_0Reference
instance Selector S1_0_1Reference
instance Selector S1_0_2Reference
instance Selector S1_0_3Reference
instance Selector S1_0_4Reference
instance Selector S1_0_5Reference
instance Selector S1_0_6Reference
instance Selector S1_0_7Reference
instance Selector S1_0_8Reference
instance Selector S1_0_9Reference
instance Selector S1_0_10Reference
instance Selector S1_0_11Reference
instance Selector S1_0_12Reference
instance Selector S1_0_13Reference
instance Selector S1_0_14Reference
instance Selector S1_0_15Reference
instance Selector S1_0_16Reference
instance Selector S1_0_17Reference
instance Selector S1_0_18Reference
instance Selector S1_0_19Reference
instance Selector S1_0_20Reference
instance Selector S1_0_21Reference
instance Selector S1_0_22Reference
instance Selector S1_0_23Reference
instance Selector S1_0_24Reference
instance Selector S1_0_25Reference
instance Selector S1_0_26Reference
instance Selector S1_0_27Reference
instance Selector S1_0_28Reference
instance Selector S1_0_29Reference
instance Selector S1_0_30Reference
instance Selector S1_0_31Reference
instance Selector S1_0_32Reference
instance Selector S1_0_33Reference
instance Selector S1_0_34Reference
instance Selector S1_0_35Reference
instance Selector S1_0_36Reference
instance Selector S1_0_37Reference
instance Selector S1_0_38Reference
instance Selector S1_0_39Reference
instance Selector S1_0_40Reference
instance Selector S1_0_41Reference
instance Selector S1_0_42Reference
instance Selector S1_0_43Reference
instance Selector S1_0_44Reference
instance Selector S1_0_45Reference
instance Selector S1_0_46Reference
instance Selector S1_0_47Reference
instance Selector S1_0_48Reference
instance Selector S1_0_49Reference
instance Selector S1_0_50Reference
instance Selector S1_0_51Reference
instance Selector S1_0_52Reference
instance Selector S1_0_53Reference
instance Selector S1_0_54Reference
instance Selector S1_0_55Reference
instance Selector S1_0_56Reference
instance Selector S1_0_57Reference
instance Selector S1_0_58Reference
instance Selector S1_0_59Reference
instance Selector S1_0_60Reference
instance Selector S1_0_61Reference
instance Selector S1_0_62Reference
instance Selector S1_0_63Reference
instance Selector S1_0_64Reference
instance Selector S1_0_65Reference
instance Selector S1_0_66Reference
instance Selector S1_0_67Reference
instance Selector S1_0_68Reference
instance Selector S1_0_69Reference
instance Selector S1_0_70Reference
instance Selector S1_0_71Reference
instance Selector S1_0_72Reference
instance Selector S1_0_73Reference
instance Selector S1_0_74Reference
instance [incoherent] ToJSON Reference
instance [incoherent] FromJSON Reference
instance [incoherent] ToJSON CNum
instance [incoherent] FromJSON CNum
instance [incoherent] ToJSON RefType
instance [incoherent] FromJSON RefType
instance [incoherent] Show RefType
instance [incoherent] ToJSON [RefDate]
instance [incoherent] FromJSON [RefDate]
instance [incoherent] FromJSON RefDate
instance [incoherent] FromJSON [Agent]
instance [incoherent] ToJSON Agent
instance [incoherent] FromJSON Agent
instance [incoherent] Show Value
instance [incoherent] IsString Literal
instance [incoherent] ToJSON Literal
instance [incoherent] FromJSON Literal


-- | 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 (<a>_</a>) to
--   dashes (<a>-</a>)
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 Show Environment
instance Show EvalMode
instance Eq EvalMode
instance Show EvalState


-- | 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.Names
evalNames :: Bool -> [String] -> [Name] -> String -> State EvalState [Output]

-- | The <a>Bool</a> is <a>True</a> when formatting a name with a final
--   <a>et-al</a>. 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

-- | 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 -> Reference -> [Output]
evalSorting :: EvalMode -> [Locale] -> [MacroMap] -> [Option] -> [Sort] -> Abbreviations -> 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, 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 form a <a>OName</a> element with <a>proc</a>.
rmGivenNames :: Output -> Output
rmNameHash :: 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 Show GiveNameDisambiguation
instance Eq 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]]


-- | This module provides functions for processing the evaluated
--   <a>Output</a> for disambiguation and citation collapsing.
module Text.CSL.Proc
data ProcOpts
ProcOpts :: BibOpts -> ProcOpts
bibOpts :: ProcOpts -> BibOpts
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, 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 Show BibOpts
instance Read BibOpts
instance Eq BibOpts
instance Show ProcOpts
instance Read ProcOpts
instance Eq ProcOpts
instance Show FieldVal
instance FromJSON BibOpts
instance FromJSON FieldVal


module Text.CSL.Input.Bibtex
readBibtexInput :: Bool -> FilePath -> IO [Reference]
readBibtexInputString :: Bool -> String -> IO [Reference]


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
convertRefs :: Maybe MetaValue -> Either String [Reference]


module Text.CSL.Pickle.Xml
showXML :: Content -> String
getText :: [Content] -> Maybe String
getChildren :: Content -> [Content]
getElemName :: Content -> Maybe QName
dropFirstElem :: [Content] -> [Content]
dropText :: [Content] -> [Content]
getAttName :: Attr -> String
getAttrl :: Content -> [Attr]
getAttrVal :: [Content] -> String
mkText :: String -> Content
attrToCont :: Attr -> Content
mkName :: String -> QName
mkElement :: String -> [Attr] -> [Content] -> Content
mkAttribute :: String -> String -> Attr
qualifiedName :: QName -> String
onlyElems' :: [Content] -> [Content]
parseXML' :: ByteString -> [Content]


-- | This module is mostly copied from Text.XML.HXT.Arrow.Pickle.Xml which
--   is an adaptation of the pickler combinators developed by Andrew
--   Kennedy.
--   
--   See:
--   <a>http://research.microsoft.com/~akenn/fun/picklercombinators.pdf</a>
module Text.CSL.Pickle
data St
St :: [Attr] -> [Content] -> St
attributes :: St -> [Attr]
contents :: St -> [Content]
data PU a
PU :: ((a, St) -> St) -> (St -> (Maybe a, St)) -> PU a
appPickle :: PU a -> (a, St) -> St
appUnPickle :: PU a -> St -> (Maybe a, St)
pickleXML :: PU a -> a -> String
unpickleXML :: PU a -> [Content] -> Maybe a
emptySt :: St
addAtt :: Attr -> St -> St
addCont :: Content -> St -> St
dropCont :: St -> St
getAtt :: String -> St -> Maybe Attr
getCont :: St -> Maybe Content
class XmlPickler a
xpickle :: XmlPickler a => PU a
xpPrim :: (Read a, Show a) => PU a
xpUnit :: PU ()
xpZero :: PU a
xpLift :: a -> PU a
xpCondSeq :: PU b -> (b -> a) -> PU a -> (a -> PU b) -> PU b
xpSeq :: (b -> a) -> PU a -> (a -> PU b) -> PU b
xpChoice :: PU b -> PU a -> (a -> PU b) -> PU b
xpWrap :: (a -> b, b -> a) -> PU a -> PU b
xpDefault :: Eq a => a -> PU a -> PU a
xpOption :: PU a -> PU (Maybe a)
xpAlt :: (a -> Int) -> [PU a] -> PU a
xpList :: PU a -> PU [a]
xpLiftMaybe :: Maybe a -> PU a
xpWrapMaybe :: (a -> Maybe b, b -> a) -> PU a -> PU b
xpPair :: PU a -> PU b -> PU (a, b)
xpTriple :: PU a -> PU b -> PU c -> PU (a, b, c)
xp4Tuple :: PU a -> PU b -> PU c -> PU d -> PU (a, b, c, d)
xp5Tuple :: PU a -> PU b -> PU c -> PU d -> PU e -> PU (a, b, c, d, e)
xp6Tuple :: PU a -> PU b -> PU c -> PU d -> PU e -> PU f -> PU (a, b, c, d, e, f)
xpText :: PU String
xpText0 :: PU String
xpElem :: String -> PU a -> PU a

-- | A pickler for interleaved elements.
xpIElem :: String -> PU a -> PU a
xpAttr :: String -> PU a -> PU a
xpElemWithAttrValue :: String -> String -> String -> PU a -> PU a
xpAttrFixed :: String -> String -> PU ()
xpAddFixedAttr :: String -> String -> PU a -> PU a
uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
uncurry4 :: (a -> b -> c -> d -> e) -> (a, b, c, d) -> e
uncurry5 :: (a -> b -> c -> d -> e -> f) -> (a, b, c, d, e) -> f
unescape :: String -> String
readXmlString :: Show a => PU a -> ByteString -> a
readXmlFile :: Show a => PU a -> FilePath -> IO a
readFile' :: FilePath -> IO ByteString
instance XmlPickler a => XmlPickler (Maybe a)
instance XmlPickler a => XmlPickler [a]
instance XmlPickler ()
instance XmlPickler Integer
instance XmlPickler Int


-- | Parser for Style
module Text.CSL.Parser

-- | Read and parse a CSL style file into a localized sytle.
readCSLFile :: 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
instance XmlPickler CSCategory
instance XmlPickler CSAuthor
instance XmlPickler CSInfo
instance XmlPickler NamePart
instance XmlPickler Name
instance XmlPickler DatePart
instance XmlPickler Match
instance XmlPickler DateForm
instance XmlPickler NumericForm
instance XmlPickler Form
instance XmlPickler Gender
instance XmlPickler Bool
instance XmlPickler Sort
instance XmlPickler Formatting
instance XmlPickler Condition
instance XmlPickler IfThen
instance XmlPickler Element
instance XmlPickler Layout


-- | <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
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 -> Literal -> 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 -> Literal
getReference :: [Reference] -> Cite -> Maybe Reference
parseLocator :: String -> (String, String)
setNearNote :: Style -> [[Cite]] -> [[Cite]]

-- | Read and parse a CSL style file into a localized sytle.
readCSLFile :: 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 -> ProcOpts
bibOpts :: ProcOpts -> BibOpts
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] -> BiblioData
citations :: BiblioData -> [Formatted]
bibliography :: BiblioData -> [Formatted]

-- | Render the <a>Formatted</a> into a plain text string.
renderPlain :: Formatted -> String
renderPandoc :: Style -> Formatted -> [Inline]
renderPandoc' :: Style -> Formatted -> 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
