!Ĩ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe|(c) Simon Marlow 2003-2006, David Waern 2006-2009, Mateusz Kowalczyk 2013BSD-likehaddock@projects.haskellorg experimentalportableSafe456O haddock-libraryb is a set of instructions for marking up documentation. In fact, it's really just a mapping from DocX to some other type [a], where [a] is usually the type of the output (HTML, say). Use  to apply a  to a .haddock-library.The namespace qualification for an identifier.$haddock-library1A qualified identifier that couldn't be resolved.&haddock-library6This constructor has no counterpart in Haddock markup.2haddock-libraryA (HTML) anchor.Yhaddock-libraryWith the advent of T, we may want to start attaching more meta-data to comments. We make a structure for this ahead of time so we don't have to gut half the core each time we want to add such info._haddock-libraryDRender the a namespace into the same format it was initially parsed.`haddock-libraryNOTE: Only defined for base >= 4.10.0ahaddock-libraryNOTE: Only defined for base >= 4.10.0bhaddock-libraryNOTE: Only defined for  base >= 4.8.0chaddock-libraryNOTE: Only defined for base >= 4.10.0dhaddock-libraryNOTE: Only defined for base >= 4.10.0ehaddock-libraryNOTE: Only defined for  base >= 4.8.0` 6543210/.-,+*)('&%$#"! 78:9;<=>?BA@CDFEGHJIKLNMOPRQSTUVXWYZ\[]^_`YZ\[UVXW]^TSOPRQKLNMGHJICDFE>?BA@;<=78:96543210/.-,+*)('&%$#"! _ (c) Alec Theriault 2018-2019,BSD-likehaddock@projects.haskell.org experimentalportableNone =>?HMV4 haddock-libraryuThe only bit of information we really care about truding along with us through parsing is the version attached to a @since- annotation - if the doc even contained one.haddock-libraryAlways succeeds, but returns 1 if at the end of input. Does not consume input.Equivalent to 6Parsec.optionMaybe . Parsec.lookAhead $ Parsec.anyChar, but more efficient.haddock-library5Fails if at the end of input. Does not consume input.Equivalent to Parsec.lookAhead Parsec.anyChar, but more efficient.haddock-library3Parses the given string. Returns the parsed string.Equivalent to Parsec.string (T.unpack t) $> t, but more efficient.haddock-libraryTKeep matching characters as long as the predicate function holds (and return them).Equivalent to fmap T.pack . Parsec.many, but more efficient.haddock-libraryLike %, but fails if no characters matched.Equivalent to fmap T.pack . Parsec.many1, but more efficient.haddock-library\Scan the input text, accumulating characters as long as the scanning function returns true.haddock-libraryParse a decimal number.haddock-libraryParse a hexadecimal number.haddock-library scan functionhaddock-library initial stateK(c) Mateusz Kowalczyk 2013-2014, Simon Hengel 2013BSD-likehaddock@projects.haskell.org experimentalportableNone>Shaddock-library)Characters that count as horizontal spacehaddock-library(Skip and ignore leading horizontal spacehaddock-libraryTake leading horizontal spacehaddock-library!Remove escapes from given string.GOnly do this if you do not process (read: parse) the input any further.haddock-libraryConsume characters from the input up to and including the given pattern. Return everything consumed except for the end pattern itself. (c) Alec Theriault 2019,BSD-likehaddock@projects.haskell.org experimentalportableNone%Jhaddock-librarySIdentifier string surrounded with namespace, opening, and closing quotes/backticks.haddock-libraryETry to parse a delimited identifier off the front of the given input.This tries to match as many valid Haskell identifiers/operators as possible, to the point of sometimes accepting invalid things (ex: keywords). Some considerations:8operators and identifiers can have module qualifications/operators can be wrapped in parens (for prefix)3identifiers can be wrapped in backticks (for infix))delimiters are backticks or regular ticks_since regular ticks are also valid in identifiers, we opt for the longest successful parseThis function should make O(1) allocationsSafeNHhaddock-libraryThe identity markuphaddock-libraryMap a  into a best estimate of an alternate string. The idea is to strip away any formatting while preserving as much of the actual text as possible.SafeShaddock-library Concat using .haddock-libraryLike  but also joins the Y info.haddock-libraryWe do something perhaps unexpected here and join the meta info in reverse : this results in the metadata from the latest  paragraphs taking precedence.haddock-library'This is not a monoidal append, it uses  for the [ and \.K(c) Mateusz Kowalczyk 2013-2014, Simon Hengel 2013BSD-likehaddock@projects.haskell.org experimentalportableNone%b-haddock-library!table cell: top left bottom righthaddock-libraryTDrops the quotes/backticks around all identifiers, as if they were valid but still s.haddock-library Maps over #s over  with potentially failing conversion using user-supplied function. If the conversion fails, the identifier is deemed to not be valid and is treated as a regular string.haddock-librarySMain entry point to the parser. Appends the newline character to the input string.haddock-library Variant of  for  instead of haddock-library5Parse a text paragraph. Actually just a wrapper over ! which drops leading whitespace.haddock-libraryParses and processes 9https://en.wikipedia.org/wiki/Numeric_character_referenceNumeric character referencesparseString "&#65;" DocString "A"haddock-libraryList of characters that we use to delimit any special markup. Once we have checked for any of these and tried to parse the relevant markup, we can assume they are used as regular text.haddock-libraryPlain, regular parser for text. Called as one of the last parsers to ensure that we have already given a chance to more meaningful parsers before capturing their characers.haddock-librarySkips a single special character and treats it as a plain string. This is done to skip over any special characters belonging to other elements but which were not deemed meaningful at their positions.haddock-libraryEmphasis parser.parseString "/Hello world/"%DocEmphasis (DocString "Hello world")haddock-library Bold parser.parseString "__Hello world__"!DocBold (DocString "Hello world")haddock-libraryLike ., but unconditionally take escaped characters.haddock-libraryLike ., but unconditionally take escaped characters.haddock-libraryEText anchors to allow for jumping around the generated documentation.parseString "#Hello world#"DocAName "Hello world"haddock-libraryMonospaced strings.parseString "@cruel@"!DocMonospaced (DocString "cruel")haddock-library Module names.Note that we allow # and '\'8 to support anchors (old style anchors are of the form SomeModule\#anchor).haddock-library[Picture parser, surrounded by << and >>. It's possible to specify a title for the picture.parseString "<<hello.png>>"CDocPic (Picture {pictureUri = "hello.png", pictureTitle = Nothing})!parseString "<<hello.png world>>"HDocPic (Picture {pictureUri = "hello.png", pictureTitle = Just "world"})haddock-library,Inline math parser, surrounded by \( and \).IparseString "\\(\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}\\)"EDocMathInline "\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}"haddock-library-Display math parser, surrounded by \[ and \].IparseString "\\[\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}\\]"FDocMathDisplay "\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}"haddock-libraryMarkdown image parser. As per the commonmark reference recommendation, the description text for an image converted to its a plain string representation.?parseString "![some /emphasis/ in a description](www.site.com)"GDocPic (Picture "www.site.com" (Just "some emphasis in a description"))haddock-libraryParagraph parser, called by .haddock-library!Provides support for grid tables.Tables are composed by an optional header and body. The header is composed by a single row. The body is composed by a non-empty list of rows.Example table with header: w+----------+----------+ | /32bit/ | 64bit | +==========+==========+ | 0x0000 | @0x0000@ | +----------+----------+%Algorithms loosely follows ideas in Chttp://docutils.sourceforge.net/docutils/parsers/rst/tableparser.pyhaddock-library1Fourth step. Given the locations of cells, forms 7 structure.haddock-libraryParse @since annotations.haddock-library(Headers inside the comment denoted with = signs, up to 6 levels deep."snd <$> parseOnly header "= Hello"MRight (DocHeader (Header {headerLevel = 1, headerTitle = DocString "Hello"}))#snd <$> parseOnly header "== World"MRight (DocHeader (Header {headerLevel = 2, headerTitle = DocString "World"}))haddock-library Parses unordered (bullet) lists.haddock-library*Parses ordered lists (numbered or dashed).haddock-libraryGeneric function collecting any further lines belonging to the list entry and recursively collecting any further lists in the same paragraph. Usually used as >someListFunction = listBeginning *> innerList someListFunctionhaddock-libraryParses definition lists.haddock-libraryDrops all trailing newlines.haddock-libraryMain worker for  and . We need the u here to be able to tell in the respective functions whether we're dealing with the next list or a nested paragraph.haddock-libraryUsed by  and  to parse any nested paragraphs.haddock-library5Attempts to fetch the next list if possibly. Used by  and G to recursively grab lists that aren't separated by a whole paragraph.haddock-library Helper for  and Q which simply takes a line of text and attempts to parse more list content with .haddock-library;Parses an indented paragraph. The indentation is 4 spaces.haddock-library1Grab as many fully indented paragraphs as we can.haddock-library-Takes a non-empty, not fully whitespace line.%Doesn't discard the trailing newline.haddock-library*Takes indentation of first non-empty line.More precisely: skips all whitespace-only lines and returns indentation (horizontal space, might be empty) of that non-empty line.haddock-libraryBlocks of text of the form: > foo > bar > bazhaddock-libraryzParses examples. Examples are a paragraph level entitity (separated by an empty line). Consecutive examples are accepted.haddock-libraryProperty parser..snd <$> parseOnly property "prop> hello world"!Right (DocProperty "hello world")haddock-libraryWParagraph level codeblock. Anything between the two delimiting @ is parsed for markup.haddock-library[Looks for URL-like things to automatically hyperlink even if they weren't marked as links.haddock-library Parses identifiers with help of .haddock-libraryString to parsehaddock-librarywidthhaddock-libraryrowshaddock-librarywidthhaddock-libraryrowshaddock-libraryindex of header separator     !"#$%&'()*+,-./0123456789:;<=>?@AABCDDEFFGHIJJKLMMNOPPQRSSTUVWXXYZ[[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   ,haddock-library-1.9.0-FYy34mzNzNY7ZMdfEvvwjTDocumentation.Haddock.TypesDocumentation.Haddock.ParserDocumentation.Haddock.MarkupDocumentation.Haddock.Doc CompatPreludemarkup"Documentation.Haddock.Parser.Monad!Documentation.Haddock.Parser.Util'Documentation.Haddock.Parser.Identifier DocMarkupHMarkup markupEmpty markupStringmarkupParagraph markupAppendmarkupIdentifiermarkupIdentifierUnchecked markupModule markupWarningmarkupEmphasis markupBoldmarkupMonospacedmarkupUnorderedListmarkupOrderedList markupDefListmarkupCodeBlockmarkupHyperlink markupAName markupPicmarkupMathInlinemarkupMathDisplaymarkupProperty markupExample markupHeader markupTable NamespaceValueTypeNoneDocHDocEmpty DocAppend DocString DocParagraph DocIdentifierDocIdentifierUnchecked DocModule DocWarning DocEmphasis DocMonospacedDocBoldDocUnorderedListDocOrderedList DocDefList DocCodeBlock DocHyperlinkDocPic DocMathInlineDocMathDisplayDocAName DocProperty DocExamples DocHeaderDocTableTabletableHeaderRows tableBodyRowsTableRow tableRowCells TableCelltableCellColspantableCellRowspantableCellContentsExampleexampleExpression exampleResultHeader headerLevel headerTitlePicture pictureUri pictureTitle Hyperlink hyperlinkUrlhyperlinkLabelPackageVersionMetaDoc_meta_docMeta_version_packageoverDocoverDocFrenderNs$fBitraversableDocH$fBifoldableDocH$fBifunctorDocH$fBitraversableMetaDoc$fBifoldableMetaDoc$fBifunctorMetaDoc$fEqMeta $fShowMeta $fEqHyperlink$fShowHyperlink$fFunctorHyperlink$fFoldableHyperlink$fTraversableHyperlink $fEqPicture $fShowPicture $fEqHeader $fShowHeader$fFunctorHeader$fFoldableHeader$fTraversableHeader $fEqExample $fShowExample $fEqTableCell$fShowTableCell$fFunctorTableCell$fFoldableTableCell$fTraversableTableCell $fEqTableRow$fShowTableRow$fFunctorTableRow$fFoldableTableRow$fTraversableTableRow $fEqTable $fShowTable$fFunctorTable$fFoldableTable$fTraversableTable$fEqDocH $fShowDocH $fFunctorDocH$fFoldableDocH$fTraversableDocH $fEqMetaDoc $fShowMetaDoc$fFunctorMetaDoc$fFoldableMetaDoc$fTraversableMetaDoc $fEqNamespace$fOrdNamespace$fEnumNamespace$fShowNamespace IdentifieridMarkup plainMarkup docConcat metaConcat metaDocConcat metaDocAppend metaAppend emptyMetaDoc docAppend docParagraph toRegularoverIdentifier parseParas parseString$fShowTCbase Text.Read.Lex isSymbolChar Data.Functor$> ParserStatepeekChar GHC.MaybeNothing peekChar'string takeWhile takeWhile1scandecimal hexadecimalParserparserStateSinceinitialParserStatesetSince parseOnlyhorizontalSpaceskipHorizontalSpacetakeHorizontalSpace removeEscapes takeUntil makeLabeledtakeIdentifier parseValidGHC.Base<|>TCString parseText text-1.2.3.1Data.Text.InternalTextparseParagraph encodedChar specialCharstring'skipSpecialCharemphasisbold takeWhile_ takeWhile1_anchor monospace moduleNamepicture mathInline mathDisplay markdownImage paragraphtable tableStepFoursinceheader unorderedList orderedList innerListdefinitionListdropNLsmore Data.EitherEitherinnerParagraphs moreListItems moreContentindentedParagraphsdropFrontOfParatakeNonEmptyLine takeIndent birdtracksexamplesproperty codeblockautoUrl identifier tableStepTwotableStepThree