n      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                      ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferred   unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None"*A record with all the data to produce the 6 of a E citation: the citation key, the part of the formatted citation that A may be colliding with other citations, the form of the citation = when a year suffix is used for disambiguation , the data to C disambiguate it (all possible contributors and all possible given C names), and, after processing, the disambiguated citation and its  year, initially empty. >A citation group: the first list has a single member when the  citation group starts with an author-in-text cite, the  I to be applied, the  between individual 0 citations and the list of evaluated citations. &The &1 generated by the evaluation of a style. Must be 6 further processed for disambiguation and collapsing. ' Some nested & ( The citation' s locator )An URL *GThe citation key, the role (author, editor, etc.), the contributor(s), I the output needed for year suf. disambiguation, and everything used for  name disambiguation. +.A (family) name with the list of given names. ,<The year suffix, the citeId and a holder for collision data -The year and the citeId .A (possibly) ranged date /The citation number 0&A number (used to count contributors) 1 A simple  2A delimiter string. 69The formatted output, produced after post-processing the  evaluated citations. 7Null formatting item 8Pandoc inline elements 9Formatted URL :Delimeter string ;Formatted string <Formatted number =List of  FormatOutput items *The representation of a parsed CSL style.  With the  defaultLocale(, the locales-xx-XX.xml loaded file and  the parsed ' cs:locale elements, produce the final  ? as the only element of a list, taking into account CSL locale  prioritization. Convert evaluated & into 6, ready for the  output filters. .Map the evaluated output of a citation group. A generic processing function. ;A generic processing function: process a data structure in  top-down manner. A generic query function. Removes all given names form a + element with .  Add, with -, a give name to the family name. Needed for  disambiguation. <Add the year suffix to the year. Needed for disambiguation. Needed for the test-suite.   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~{|}~xzyuwvmtsrqponhlkjidgfe`cba\_^][YZIJKLMNOPQRSTUVWXBCDEFGH@A>?6=<;:987&543210/.-,+*)('#%$" ! E   !"#%$&543210/.-,+*)('6=<;:987>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\_^]`cbadgfehlkjimtsrqponuwvxzy{|}~   unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None Render the 6 into a plain text string. Same as & , but will not clean up the produced  output.   unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>NoneWith a % and the formatted output generate a  in  the native 0 formats (i.e. immediately readable by pandoc). Same as (, but the output is wrapped in a pandoc  paragraph block. For the testsuite: we use  and  to store  nocase and nodecor rich text formatting classes.   unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None  unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>NoneThe  record. 2An existential type to wrap the different types a  is ? made of. This way we can create a map to make queries easier.       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~xyz{|}~pqrstuvwKonmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLHIJ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGJ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK$onmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLpqrstuvwxyz{|}~ unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None=Build a datatype from a JSON object. Uses selectFields which E allows to provied default values for fields not present in the JSON @ object. Useble with non algebraic datatype with record fields.  unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>NoneIf the first parameter is $ the plural form will be retrieved. 9Convert variable to lower case, translating underscores (_ ) to dashes (-) 000 portableunstable(Andrea Rossato <andrea.rossato@unitn.it>None portableunstable(Andrea Rossato <andrea.rossato@unitn.it>None$A pickler for interleaved elements. 9     4     4     2       unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None8Read and parse a CSL style file into the internal style  representation, the .  Parse a  into a fully localized  CFor mandatory attributes. DFor optional attributes. = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ     , !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ, !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ= !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ       unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>NoneKLMNOPKLMNOPKLMNOPKLMNOP  unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>NoneRThe  is % when formatting a name with a final et-al.  The first 1 represents the position and the second the role " (e.i. editor, translator, etc.). S The first  is ( if we are evaluating the bibliography.  The 5 is the cite position. The function also returns the ) number of contributors to be displayed. T Generate the x)s names applying et-al options, with all @ possible permutations to disambiguate colliding citations. The  ; indicate whether we are formatting the first name or not. QRSTUVWQRSTUVWQRSTUVWQRSTUVW  unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>NoneXProduce the output with a , the , a   < if the evaluation happens for disambiguation purposes, the  , the #, the position of the cite and the  . XY Z[\BXYZ[\XYZ\[XY Z[\ unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>Nonea Given the *, the list of references and the citation @ groups, disambiguate citations according to the style options. h)Evaluate again a citation group with the    field set to  (for matching the " disambiguate"  condition). i Check if the , has any conditional for disambiguation. In 7 this case the conditional will be try after all other D disambiguation strategies have failed. To be used with the generic   function. j2Get the list of disambiguation options set in the  for  citations. k9Group citation data (with possible alternative names) of ( citations which have a duplicate (same   , and same  7 if year suffix disambiiguation is used). If the first   is !0, then we need to retrieve data for year suffix  disambiguation. The second  is  when comparing both  year and contributors'( names for finding duplicates (when the  year-suffix option is set). m"For an evaluated citation get its . The disambiguated @ citation and the year fields are empty. Only the first list of  contributors'6 disambiguation data are collected for disambiguation  purposes. w?Try to disambiguate a list of lists by returning the first non * colliding element, if any, of each list: 0 disambiguate [[1,2],[1,3],[2]] = [[2],[3],[2]] xFor each element a list of :  if the element has a  duplicate in the list: " same [1,2,1] = [True,False,True] ]^_`abcdefghijklmnopqrstuvwxyz]^_`abcdefghijklmnopqrstuvwxyzabc]`_^defghijklmnopqrstuvwxyz]`_^abcdefghijklmnopqrstuvwxyz unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None{3Collapse citations according to the style options. |#Get the collapse option set in the  for citations. Group consecutive integers: 6 groupConsec [1,2,3,5,6,8,9] == [[1,2,3],[5,6],[8,9]] {|}~ {|}~ {|}~ {|}~ unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>NoneWith a  , a list of s and the list of citation @ groups (the list of citations with their locator), produce the  6 for each citation group. With a  and the list of s produce the  6 for the bibliography. With a  , a list of s and the list of  ", produce the 6 for each citation group  and the bibliography. Given the CSL  and the list of s sort the list  according to the ( and assign the citation number to each  . With a  and a sorted list of s produce the ( evaluated output for the bibliography. Given the CSL  and the list of s coupled with their  s, generate a . The citations are sorted  according to the . The  is - if we are formatting a textual citation (in  pandoc terminology).  unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None'Read a file with a single MODS record. /Read a file with a collection of MODS records. von Hicks,! Jr., Michael or la Martine,! III, Martin B. de or  Rossato, Jr., Andrea G. B. or Paul, III, Juan. Possible formats: YYYY, YYYY-MM,  YYYY-MM-DD. &"%%" unportableunstableandrea.rossato@unitn.itNone?Read a file with a bibliographic database. The database format & is recognized by the file extension. Supported formats are: json, mods, bibtex, biblatex, ris,  endnote,  endnotexml, isi, medline, and copac. #:Perform a function in a temporary directory and clean up. $1Create a temporary directory with a unique name. %#$& %#$& unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None !#$%6789:;<=      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG ʫ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG  !#%$6=<;:987 unportableunstable(Andrea Rossato <andrea.rossato@unitn.it>None'()*+,-./01 '()*+,-./012 !"#$%&'()*++,-./0123456789:;;<=>?@ABCDEFGHIJKLMNOPQRRSSTTUVWXYZZ[\]^_`abcdefghiijklmknopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsttuvwxyz{{|}~                                                          ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/                                 !"#$%&'()*+,-.citeproc-hs-0.3.8Text.CSL.StyleText.CSL.Output.PlainText.CSL.Output.PandocText.CSL.Eval.OutputText.CSL.ReferenceText.CSL.Input.JsonText.CSL.Eval.CommonText.CSL.Pickle.HexpatText.CSL.PickleText.CSL.ParserText.CSL.Eval.DateText.CSL.Eval.Names Text.CSL.EvalText.CSL.Proc.DisambText.CSL.Proc.Collapse Text.CSL.ProcText.CSL.Input.MODSText.CSL.Input.Bibutils Text.CSL.TestPaths_citeproc_hsText.CSLNameDataNDnameKey nameCollisionnameDisambDatanameDataSolvedCiteDataCDkey collisiondisambYS disambDatadisambedsameAscitYear BiblioDataBD citations bibliography CitationGroupCGCiteciteId citePrefix citeSuffix citeLabel citeLocatorciteNoteNumber citePositionnearNote authorInTextsuppressAuthorciteHash CitationsAffix PandocText PlainTextOutputOLocOUrlOContribONameOYearSufOYearODateOCitNumONumOStrODelOPanOSpaceONullFormattedOutputFNullFPanFUrlFDelFSFNFO CSCategoryCSAuthorCSInfocsiTitle csiAuthor csiCategoriescsiId csiUpdated Formattingprefixsuffix fontFamily fontStyle fontVariant fontWeighttextDecoration verticalAligntextCasedisplayquotes stripPeriodsnoCasenoDecorNamePart NameAttrsNameEtAl NameLabelPluralNeverAlways ContextualDateForm NoFormDate NumericDateTextDate NumericForm LongOrdinalRomanOrdinalNumericFormNotSetSymbol VerbShortVerbCountShortLongSorting Descending AscendingSort SortMacro SortVariableDatePartdpNamedpForm dpRangeDelim dpFormattingMatchNoneAllAny Delimiter ConditionisTypeisSet isNumericisUncertainDate isPositiondisambiguation isLocatorIfThenElementDateGroup SubstituteNamesNumberLabelTermVariableConstMacroChooseLayout layFormatlayDelimelementsOption Bibliography bibOptionsbibSort bibLayoutCitation citOptionscitSort citLayoutMacroMapTermMapAbbrevLocale localeVersion localeLang localeOptions localeTermMap localeDateStyle styleVersion styleClass styleInfostyleDefaultLocale styleLocale styleAbbrevs csOptionscsMacroscitationbiblio mergeLocales mergeOptionsmatch defaultDatecompare'isPluralisNameisNameshasEtAlemptyFormatting unsetAffixesmergeFM emptyAffix emptyCiteformatOutputList formatOutputmapGroupOutputprocproc'query rmGivenNames rmNameHash addGivenNames addYearSuffixhasYear hasYearSuf betterThen renderPlainrenderPlainStrictprocList<+><> capitalize entityToCharhead'tail' renderPandoc renderPandoc' renderPandoc_ endWithPunctstartWithPunct headInline initInlinetailFirstInlineStr toCapitaloutput appendOutput outputList cleanOutput rmEmptyOutputaddDelim noOutputErrornoBibDataErroroStroStr'<++>rtfTags rtfParser ReferencerefIdrefTypeauthoreditor translator recipient interviewercomposerdirector illustratororiginalAuthorcontainerAuthorcollectionEditoreditorialDirectorreviewedAuthorissued eventDateaccessed container originalDate submittedtitle titleShort reviewedTitlecontainerTitlecollectionTitlecontainerTitleShortcollectionNumber originalTitle publisheroriginalPublisherpublisherPlaceoriginalPublisherPlace authority jurisdictionarchive archivePlacearchiveLocationevent eventPlacepage pageFirst numberOfPagesversionvolumenumberOfVolumesissue chapterNumbermediumstatuseditionsectionsourcegenrenoteannoteabstractkeywordnumber referencesurldoiisbnissnpmcidpmid callNumber dimensionsscale categoriescitationNumberfirstReferenceNoteNumber citationLabelCNumunCNumRefTypeWebpageTreatyThesisSpeechSong ReviewBookReviewReportPersonalCommunication PostWeblogPostPatentPaperConferencePamphlet MusicalScore MotionPictureMap Manuscript LegalCase Legislation InterviewGraphicFigureEntryEncyclopediaEntryDictionaryEntryDatasetChapter BroadcastBookBillArticleJournalArticleNewspaperArticleMagazineArticleNoTypeRefDateyearmonthseasondayothercircaAgent givenName droppingPartnonDroppingPart familyName nameSuffixliteral commaSuffixEmpty ReferenceMapValuemkRefMap formatField fromValue isValueSetemptyReference numericVars parseLocator getReference processCitessetCitationNumber setPageFirst setNearNotereadNum readJsonInputreadJsonInputString readJsonFilereadJsonStringreadJsonAbbrevFilereadJsonAbbrevreadJsonCitationseditJsonCiteItems editJsonInputtoStringtoJSBool procJSObject mapJSArray isRefDate readJSDatareadType selectFieldsfromObj fromJString defaultJsonEvalMode EvalBiblioEvalCite EvalSorting EnvironmentEnvcitetermsmacrosdatesoptionsnamesabbrevs EvalStaterefenvdebugmodedisambconsumeauthSubconsumededtransetalcontNumlastNamegetCite isSortinggetTerm getStringVar getDateVar getLocVargetVar getAgents getAgents'getStringValue getOptionVal isOptionSetisVarSet withRefMapformatVariableconsumeVariable consumingwhen'whenElse concatMapMtraceAttrContentshowXMLgetText getAllText dropFirstElemdropText getChildren getElemName getAttNamegetAttrl getAttrValmkTextmkName mkElement mkAttribute attrToCont qualifiedName onlyElems' parseXML' XmlPicklerxpicklePU appPickle appUnPickleSt attributescontents pickleXML unpickleXMLemptyStaddAttaddContdropContgetAttgetContxpPrimxpUnitxpZeroxpLift xpCondSeqxpSeqxpChoicexpWrap xpDefaultxpOptionxpAltxpList xpLiftMaybe xpWrapMaybexpPairxpTriplexp4Tuplexp5Tuplexp6TuplexpTextxpText0xpElemxpIElemxpAttrxpElemWithAttrValue xpAttrFixedxpAddFixedAttruncurry3uncurry4uncurry5unescape readXmlString readXmlFile readFile' readCSLFileparseCSL parseCSL'readLocaleFilexpStylexpInfoxpLocalexpTermsxpMacros xpCitationxpBibliographyxpOpt xpNamesOpt xpNameFormat xpNameAttrs xpNameOpt xpBibOpts xpCitOpts xpStyleOptsxpSortxpChoosexpMacroxpConst xpVariablexpTermxpNamesxpLabel xpSubStitutexpGroupxpNumberxpDate xpLocaleDate xpTextElem xpDelimiterxpPluralxpCommon xpAttrText xpAttrText'xpAttrWithDefaultxpIElemWithDefaultreadabletoShowtoReadlangBaseevalDategetDate formatDateordinal longOrdinal parseRefDate evalNames formatNamesisEtAl formatNameunwords' formatLabel evalLayout evalSortinglast'trimsplitGiveNameDisambiguationAllNamesByCiteNoGivendisambCitations mapDisambDatamapCitationGroupdisambAddNamesdisambAddGivenNames updateContrib updateOName reEvaluatehasIfDisgetCitDisambOptionsgetDuplCiteDatarmExtras getCiteDatagetYearsgetDuplNameData getDuplNamesgetNamegenerateYearSuffixsetYearSuffCollisionupdateYearSuffixesgetYearSuffixes rmYearSuff disambiguatesame hasDuplicates allTheSamecollapseCitGroupsgetCollapseOptionscollapseNumber collapseYearcollapseYearSufcollapseYearSufRangedaddCiteAffixes isNumStyle groupConsecBibOptsExcludeIncludeSelectProcOptsbibOptsprocOptsprocessCitationsprocessBibliographyciteprocprocRefs sortItems procBiblio filterRefs procGroupformatBiblioLayoutformatCitLayout addAffixeslocalModifiersDetailSection ChapterNrIssueVolumePage readModsFilereadModsCollectionFilexpModsCollectionxpMods xpReference xpCiteKeyxpOrigin xpRefTypexpGenre xpRelatedItemxpTitlexpAgentsxpAgent parseName xpNameDataxpPartxpDetailxpPagexpUrlxpIsbnxpDoi xpIdentifierxpNotereadDate parseDate emptyAgents fromAgent readRefTypegenreTypeMapping BibFormatCopacMedlineIsi EndnotXmlEndnoteRisBibLatexBibtexNativeJsonModsreadBiblioFilereadBiblioStringTesttestMode testInputtestCSL testAbbrevs testResult testBibSect testCitItems testCitationstoTestrunTesttesttest'test_runTScatchIObindirlibdirdatadir libexecdir getBinDir getLibDir getDataDir getLibexecDirgetDataFileNamebaseGHC.BaseString $fJSONAffix $fEqNameData $fEqCiteData$fShowFormatting $fOrdSortingrenderpandoc-types-1.10Text.Pandoc.DefinitionPandocLink StrikeouttoStr cleanStrictcleanclean'flipFlopisPunctuationInQuote convertQuoted lastInline tailInline mapHeadInline getInline $fShowRefType $fShowAgent $fShowValueghc-prim GHC.TypesTrue$fXmlPicklerMaybe$fXmlPickler[]$fXmlPickler()$fXmlPicklerInteger$fXmlPicklerInt$fXmlPicklerCSCategory$fXmlPicklerCSAuthor$fXmlPicklerCSInfo$fXmlPicklerNamePart$fXmlPicklerName$fXmlPicklerDatePart$fXmlPicklerMatch$fXmlPicklerDateForm$fXmlPicklerNumericForm$fXmlPicklerForm$fXmlPicklerBool$fXmlPicklerSort$fXmlPicklerFormatting$fXmlPicklerCondition$fXmlPicklerIfThen$fXmlPicklerElement$fXmlPicklerLayoutBool evalElements evalElement evalIfThengetFormattedValue formatTitle formatNumber formatRange expandedRange minimalRange chicagoRangeFalse$fXmlPicklerAgent withTempDir createTempDirreadBiblioFile'getExt readTestFiletoJson fieldsParser fieldParser pandocBib pandocToHTMLunlines' localeCachegetCachedLocaleputCachedLocaledoTest